Code Monkey home page Code Monkey logo

atom-existdb's Introduction

Atom editor package for eXistdb

Build StatusBuild statussemantic-release

This package contains a set of views and providers to support XQuery development using the eXistdb Native XML Database. In particular, the features are:

  • tree view to browse the contents of the database
  • open, edit and save files stored remotely in the database
  • syntax highlighting and linting of XQuery scripts (based on xqlint)
  • autocomplete showing all functions and variables which are in scope, including those from imported modules
  • a hyperclick provider to navigate to the definition of a function, even if located in an imported module
  • refactoring of variables
  • XML auto-close tags, tag renaming
  • execution of XQuery scripts within the editor
  • symbols view to navigate to functions and variables which are in scope for the current XQuery

First steps

Dependencies

The eXistdb package requires a small support app to be installed in the database instance you want to access. You should be asked if you would like to install the support app the first time the package is activated. If this fails for any reason, install it manually by going to the eXistdb dashboard. In the package manager, search for an app called Server side support scripts for the Atom editor package and install it.

Linting and code navigation also depend on two Atom packages, which should be installed automatically unless they are already present:

  1. linter
  2. hyperclick

Usage

Introduction

The package supports two different workflows for developing with eXist:

  1. Directly work on the files stored inside the database, i.e. all development is done in eXist
  2. Atom is called on a directory on the file system, which resembles an application stored in eXist. Editing is done in the directory but files are automatically synced to the database.

Most eXist users will be familiar with the first approach because this is how the in-browser IDE, eXide, works. (2) has advantages if you are working on an existing app, e.g. cloned from git. In this case, you deploy the app once, configure the automatic sync and continue to edit files in the file system. We'll cover this workflow below. See the section on Automatic Sync.

Getting Started

When activated the first time, the package tries to detect if it can connect to an eXist server at the default location and if the server-side support app is installed on the database instance (see the first screencast above). By default, the package assumes that eXist can be reached using the URL: http://localhost:8080/exist, and the password for the admin user is empty.

If you changed the default eXist configuration or would like to connect to a different instance, select "Edit Server Configuration" from the packages menu or run the existdb:edit-configuration command. The configuration file is a simple JSON file:

{
    "servers": {
        "localhost": {
            "server": "http://localhost:8080/exist",
            "user": "admin",
            "password": ""
        }
    }
}

The "servers" object is a dictionary mapping server names to connection details for each server available. After changing this file, you may need to call the Reconnect command from the package menu in Atom.

If the server-side support app is not installed on the selected server instance, you will be asked to install it. Just answer with "Yes" and the app will be installed automatically.

Once the package is activated, you should see the database browser tree view on either the left or right side of the Atom editor window. If not, please select Toggle Database View from the package menu (or press cmd-ctrl-e on mac, ctrl-alt-e on windows).

Clicking on any resource in the database browser will open the remote file for editing in an Atom editor tab. Behind the scenes, the resource is downloaded and stored into a temporary directory. The connection with the remote resource is preserved though, so pressing save in the editor will re-upload the changed content into the database. This should also work across restarts of Atom: the package detects if you had previously opened files stored in eXist and re-downloads them upon restart.

A right-click on a resource or collection in the database browser opens a context menu from which one can

  • create new collections or resources
  • delete resources
  • reindex a collection
  • refresh the collection tree

Editor Features

Autocomplete

While you type, autocomplete will talk to the database to get a list of functions or variable names which are in scope and may match what you just typed. This includes all functions and variables which are visible to your current code.

Concerning local variables, autocomplete looks at the XQuery syntax tree corresponding to the current position of the cursor to determine which variables would be in scope.

Linting

Whenever you change an XQuery file, its contents will be forwarded to eXist and any compile errors will pop up in the editor window. This will not only detect errors in the current file, but also issues in modules it imports.

In addition to server-side compilation, xqlint will be called in the background to provide hints and alerts for the currently open file. The eXistdb package combines those with the feedback coming from the eXist server.

Navigate to a function or variable definition

The package includes a provider for hyperclick: keep the ctrl or command key pressed while moving the mouse over a function call or variable name and it should be highlighted. Clicking on the highlighted range should navigate to the definition of the function or variable, given that the source location of the corresponding XQuery module is known to the XQuery engine (obviously it won't work for the standard Java modules compiled into eXist). If the declaration resides in a different file, it will be opened in a new editor tab.

Just in case hyperclick doesn't work for you: place the cursor inside a function call or variable and press cmd-alt-g or ctrl-alt-g.

Symbol browser

To quickly navigate to the definition of a function or variable, you can also use the symbol browser: press cmd-ctrl-r or ctrl-alt-r to get a popup showing all functions and variables which are visible to the code currently open in the editor.

Type a few characters to limit the list to functions or variable containing that string sequence. Press return to jump to a highlighted item.

Refactoring

You will notice that if you place the cursor inside a variable name, other occurrences of the same variable within the current scope will be highlighted. To rename the variable, press cmd-alt-v or ctrl-alt-v. This will select all occurrences and you can type as usual to change them all simultaneously. Once you're done, press ESC to get back to the single cursor.

XML Editing

Expand Selection

Pressing alt-up will expand the current selection to the closest XQuery expression, respecting XQuery semantics. Repeatedly press alt-up to select larger blocks.

XML Editing in XQuery

  • open XML tags are closed automatically if you press </ inside an XML context
  • changing the name of a tag will also change the corresponding opening or closing tag

XML Editing

Execute XQuery scripts

You can send the XQuery code in the current editor to eXist for execution by pressing cmd-ctrl-enter (mac) or alt-shift-enter (windows/linux). The result will be displayed in a new editor tab. Obviously this will only work for XQuery main modules.

Executing query

Using the File Tree View

Inside Atom's file tree pane, right clicking will show a subcategory existdb in the context menu for files and directories.

  • Upload Selected will upload any selected files to the database collection highlighted in the DB view
  • Deploy Package is shown if you click on a .xar file (which is eXist's format for installable packages). Selecting it will install the xar into the database using eXist's package management features.

Automatic Sync

Automatic sync will start a background thread which keeps watching the current project directory for changes. Any change will be immediately uploaded to the corresponding target collection in the database. This means you can work on the files in the file system as you would usually do in Atom, though it even detects changes happening outside the editor, e.g. if you copy or remove files.

To get started, open Atom on the root directory containing the source code of the eXist app you're working on. Atom projects are directory-based, so whatever directory you choose will become the root of your project.

Next, right click on the project root in the file tree and select Edit Configuration for Current Project (or use the existdb package menu). This creates a configuration file called .existdb.json in your project root:

{
    "servers": {
        "localhost": {
            "server": "http://localhost:8080/exist",
            "user": "admin",
            "password": ""
        }
    },
    "sync": {
        "server": "localhost",
        "root": "/db/apps/my-app",
        "active": true,
        "ignore": [
            ".existdb.json",
            ".git/**",
            "node_modules/**",
            "bower_components/**"
        ]
    }
}

The "servers" configuration is identical to the global config file, but there's an additional property "sync", which configures the mapping between the project directory and a collection on the server:

Property Description
server the name of the server entry to connect to
root the root collection to sync with
active sync will only be active if this is set to true
ignore an array of file path patterns which should not be synced

Workflow for Working on a Cloned Repo

Most of the time you will probably use automatic sync on an eXist-db application package you cloned from git. In this case, the workflow to get started would be as follows:

  1. clone the repository into a local directory
  2. build the xar and deploy it into eXistdb
  3. configure automatic sync on the project
  4. start coding
  5. commit your changes from the directory as usually

Caveats

Changes made to the project directory while Atom is closed will not be detected and thus not synced to the database. Future versions of the package may contain a "sync upon startup" feature.

Development

Building from source

Clone the main package, cd into it and run apm install once. This creates a subdirectory node_modules. Next, call apm link . to register the package with Atom. The complete steps:

git clone https://github.com/eXist-db/atom-existdb.git
cd atom-existdb
apm install
apm link .

You may also want to clone and build the server-side support app:

git clone https://github.com/eXist-db/atom-editor-support.git
cd atom-editor-support
ant

This creates atom-editor-[version].xar inside the build/ directory. Deploy this into your eXist instance using the dashboard.

Releasing

Releases are managed by semantic-release. Your commit messages should follow angular commit message conventions. A bot will calculate the correct semantic version number, and update package.json and handle release. Do NOT modify this as part of your commits.

atom-existdb's People

Contributors

dependabot-support avatar duncdrum avatar joewiz avatar semantic-release-bot avatar wolfgangmm avatar

Stargazers

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

Watchers

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

atom-existdb's Issues

Uncaught Error: Invalid node found

What triggered the error:

  • In Database view, I right-clicked on a folder (/db/apps/hsg-shell), selected New Resource, entered test.xq, and began a query, entering:
xquery version "3.1";

declare function local:check
  • The error (below) appeared.
  • I can reproduce if I follow the above steps, then delete local:check in the editor.

Atom Version: 1.6.2
System: Mac OS X 10.11.4
Thrown From: existdb package, v0.1.3

Stack Trace

Uncaught Error: Invalid node found

At /Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:37

Error: Invalid node found
    at Object.exports.TreeOps.flatten (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/tree_ops.js:8:19)
    at /Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:150:37
    at [object Object].apply (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:30:13)
    at /Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:149:28
    at Array.forEach (native)
    at [object Object].Prolog (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:124:19)
    at [object Object].visit (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:596:30)
    at [object Object].visitChildren (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:610:22)
    at [object Object].visit (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:600:18)
    at [object Object].visitChildren (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:610:22)
    at [object Object].visit (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:600:18)
    at [object Object].visitChildren (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:610:22)
    at [object Object].visit (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:600:18)
    at new exports.Translator (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/compiler/translator.js:615:10)
    at new exports.XQLint (/Users/joe/.atom/packages/existdb/node_modules/xqlint/lib/xqlint.js:121:22)
    at Object.module.exports.XQUtils.xqlint (/Users/joe/.atom/packages/existdb/lib/xquery-helper.coffee:7:26)
    at Object.$.ajax.success (/Users/joe/.atom/packages/existdb/lib/existdb.coffee:229:38)
    at fire (/Users/joe/.atom/packages/existdb/node_modules/jquery/dist/jquery.js:3187:31)
    at Object.self.fireWith [as resolveWith] (/Users/joe/.atom/packages/existdb/node_modules/jquery/dist/jquery.js:3317:7)
    at done (/Users/joe/.atom/packages/existdb/node_modules/jquery/dist/jquery.js:8785:14)
    at XMLHttpRequest.<anonymous> (/Users/joe/.atom/packages/existdb/node_modules/jquery/dist/jquery.js:9151:9)

Commands

     -1:59.4.0 tree-view:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -1:54.3.0 existdb:toggle-tree-view (atom-pane.pane.active)
     -0:49.9.0 application:new-file (ul.list-inline.tab-bar.inset-panel)
     -0:44.7.0 core:close (atom-text-editor.editor.is-focused)
     -0:41.1.0 existdb:new-file (span.icon.icon-file-directory.collection)
     -0:38.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:31.8.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -0:31 editor:newline (atom-text-editor.editor.is-focused)
  3x -0:24.5.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:23.6.0 core:move-left (atom-text-editor.editor.is-focused)
     -0:23.6.0 core:move-down (atom-text-editor.editor.is-focused)
  2x -0:23.2.0 editor:move-to-beginning-of-word (atom-text-editor.editor.is-focused)
  3x -0:22.4.0 core:move-left (atom-text-editor.editor.is-focused)
     -0:20.6.0 core:backspace (atom-text-editor.editor.is-focused)
  3x -0:19.9.0 core:move-down (atom-text-editor.editor.is-focused)
  3x -0:13.2.0 core:backspace (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "unity-ui",
      "atom-light-syntax"
    ]
  },
  "existdb": {}
}

Installed Packages

# User
existdb, v0.1.3
hyperclick, v0.0.35
linter, v1.11.4

# Dev
No dev packages

Function.extractParams is deprecated.

Assigning custom properties to a marker when creating/copying it is
deprecated. Please, consider storing the custom properties you need in
some other object in your package, keyed by the marker's id property.

Function.extractParams (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker.js:43:14)
MarkerLayer.markRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker-layer.js:215:71)
DisplayMarkerLayer.markBufferRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/display-marker-layer.js:105:52)
TextEditor.markBufferRange (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1736:38)
Object.markInScopeVars (/Users/lg/.atom/packages/existdb/lib/existdb.coffee:464:33)
<unknown> (/Users/lg/.atom/packages/existdb/lib/existdb.coffee:118:26)

Uncaught TypeError: node.clearSelection is not a function

[Enter steps to reproduce below:]

  1. Enable database view
  2. Expand the database view to reveal collections beneath /db
  3. Double-click on any collection name

Atom Version: 1.9.8
System: Mac OS X 10.11.6
Thrown From: existdb package, v0.3.3

Stack Trace

Uncaught TypeError: node.clearSelection is not a function

At /Users/joe/.atom/packages/existdb/lib/existdb-tree-view.coffee:517

TypeError: node.clearSelection is not a function
    at EXistTreeView.module.exports.EXistTreeView.onDblClick (/Users/joe/.atom/packages/existdb/lib/existdb-tree-view.coffee:517:22)
    at /Users/joe/.atom/packages/existdb/lib/existdb-tree-view.coffee:1:1
    at Function.module.exports.Emitter.simpleDispatch (/Users/joe/.atom/packages/existdb/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Users/joe/.atom/packages/existdb/node_modules/event-kit/lib/emitter.js:129:28)
    at TreeNode.module.exports.TreeNode.TreeNode.dblClickItem (/Users/joe/.atom/packages/existdb/lib/tree-view.coffee:84:16)
    at space-pen-li.<anonymous> (/Users/joe/.atom/packages/existdb/lib/tree-view.coffee:1:1)
    at space-pen-li.jQuery.event.dispatch (/opt/homebrew-cask/Caskroom/atom/1.6.1/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at space-pen-li.elemData.handle (/opt/homebrew-cask/Caskroom/atom/1.6.1/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -4:26.8.0 existdb:toggle-tree-view (atom-text-editor.editor.is-focused)
     -1:55.5.0 existdb:reload-tree-view (span.icon.icon-file-directory.collection)

Config

{}

Installed Packages

# User
existdb, v0.3.3 (active)
hyperclick, v0.0.37 (active)
linter, v1.11.16 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.51.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.43.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.3.2 (active)
one-light-ui, v1.3.2 (inactive)
one-dark-syntax, v1.2.0 (active)
one-light-syntax, v1.2.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.2 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.0 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.0 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.39.0 (active)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
find-and-replace, v0.198.0 (inactive)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.64.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.238.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.1 (active)
styleguide, v0.46.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.98.1 (active)
timecop, v0.33.1 (active)
tree-view, v0.208.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.32.2 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.0 (active)
language-csharp, v0.12.1 (active)
language-css, v0.36.2 (active)
language-gfm, v0.86.0 (active)
language-git, v0.13.0 (active)
language-go, v0.42.0 (active)
language-html, v0.44.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.22.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.0 (active)
language-less, v0.29.3 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.0 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.68.5 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.52.0 (active)
language-shellscript, v0.22.3 (active)
language-source, v0.9.0 (active)
language-sql, v0.21.1 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.8 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

XInclude inclusion tags are expanded

When editing a resource with XInclude elements, the inclusion tags are evaluated and replaced by the included items.

Saving the document saves the expanded document.

Failed to access database

After adding my remote server to the existdb.json file, I'm getting the error: Error while serializing xml: java.util.EmptyStackException and no collections are showing in the tree. I can add collections locally, but they don't save to the server itself.

existdb

TextBuffer.loadSync is deprecated.

The .loadSync instance method is deprecated. Create a loaded buffer using TextBuffer.loadSync(filePath) instead.

TextBuffer.loadSync (<embedded>:32065:20)
<unknown> (/Users/HALmob/.atom/packages/existdb/lib/existdb-tree-view.coffee:527:18)
process._tickCallback (internal/process/next_tick.js:103:7)

Add toolbar for common functions

A toolbar (https://atom.io/packages/tool-bar) with buttons for common functions like "Run XQuery" and "Toggle Database View" would be useful.

A toolbar could also be used to expose commands that are currently inaccessible, like "Previous" or "Next" for paging through query results (which are currently chopped off at 10 with no means to see 11+), serialization method (currently hard coded as adaptive), indentation (currently hard coded as indent), number of results per page (currently hard coded as 10), execute xqsuite test, etc.

Add paging for query results

Currently query results are truncated to 10 items, with no mechanism to page through additional results.

Adding previous & next commands would be great. Exposing these via toolbar (see #53) would natural.

Adding a setting for the number of results per page would also be convenient.

Can't find "Server side support scripts for the Atom editor package"

Automated install of server side scripts from Atom fails (don't know why).

The readme says "If this fails for any reason, install it manually by going to the eXistdb dashboard. In the package manager, search for an app called Server side support scripts for the Atom editor package and install it." - but I cannot find that package, it's also not listed on:
http://demo.exist-db.org/exist/apps/public-repo/index.html (eXist 4.3.1 + Atom 1.33.1x64)

Where does it live?

Failure to load DB contents

OSX 10.11.4; Atom 1.7.0; exist 2.2; atom-exist 0.2.0
I followed the install instruction for my local copy of exist. After setting my password, I saw the prompt in Atom to install Server side support scripts for the Atom editor package which I did. Dashboard says they are installed and there is nothing in the exist-log that suggest a problem with the library.

Username, PW, and URI to local install are triple checked and are all correct. I restarted/reinstalled the package in atom and exist multiple times

Yet, Toggle Database View only results in.
screenshot 2016-04-14 13 50 50

Should this work with 2.2, is there a way to learn more about the bad request?

Thanks for the package Wolfgang this will be great.

Uncaught TypeError: Cannot read property 'length' of undefined

Exception thrown when I created a new function at the bottom of a file. This does not seem to reproduce the error, though.

Atom Version: 1.8.0
System: Mac OS X 10.11.5
Thrown From: existdb package, v0.3.3

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /Users/michael/.atom/packages/existdb/lib/existdb.coffee:373

TypeError: Cannot read property 'length' of undefined
    at Object.module.exports.Existdb.xqlint (/Users/michael/.atom/packages/existdb/lib/existdb.coffee:373:13)
    at Object.$.ajax.error (/Users/michael/.atom/packages/existdb/lib/existdb.coffee:340:26)
    at fire (/Users/michael/.atom/packages/existdb/node_modules/jquery/dist/jquery.js:3187:31)
    at Object.self.fireWith [as rejectWith] (/Users/michael/.atom/packages/existdb/node_modules/jquery/dist/jquery.js:3317:7)
    at done (/Users/michael/.atom/packages/existdb/node_modules/jquery/dist/jquery.js:8759:14)
    at XMLHttpRequest.<anonymous> (/Users/michael/.atom/packages/existdb/node_modules/jquery/dist/jquery.js:9115:10)

Commands

     -2:15.1.0 core:move-right (atom-text-editor.editor.power-mode.is-focused)
  3x -2:13.6.0 core:move-left (atom-text-editor.editor.power-mode.is-focused)
  5x -0:20.4.0 core:move-up (atom-text-editor.editor.power-mode.is-focused)
     -0:19.2.0 core:move-to-bottom (atom-text-editor.editor.power-mode.is-focused)
     -0:18.2.0 editor:newline (atom-text-editor.editor.power-mode.is-focused)
 25x -0:17.6.0 core:move-up (atom-text-editor.editor.power-mode.is-focused)
  3x -0:14.5.0 core:select-down (atom-text-editor.editor.power-mode.is-focused)
     -0:13.3.0 core:copy (atom-text-editor.editor.power-mode.is-focused)
     -0:12.9.0 core:move-to-bottom (atom-text-editor.editor.power-mode.is-focused)
     -0:12.2.0 core:paste (atom-text-editor.editor.power-mode.is-focused)
  2x -0:11.8.0 core:move-up (atom-text-editor.editor.power-mode.is-focused)
  5x -0:11.4.0 core:move-right (atom-text-editor.editor.power-mode.is-focused)
     -0:10.5.0 find-and-replace:select-next (atom-text-editor.editor.power-mode.is-focused)
  4x -0:07.1.0 core:delete (atom-text-editor.editor.power-mode.is-focused)
  2x -0:05.3.0 core:move-down (atom-text-editor.editor.power-mode.is-focused)
     -0:04.5.0 editor:newline (atom-text-editor.editor.power-mode.is-focused)

Config

{
  "core": {
    "audioBeep": false,
    "automaticallyUpdate": false,
    "disabledPackages": [
      "atom-color-highlight",
      "linter-js-standard",
      "linter-tidy",
      "data-tags"
    ],
    "packagesWithKeymapsDisabled": [
      "existdb"
    ],
    "themes": [
      "atom-material-ui",
      "atom-material-syntax"
    ]
  }
}

Installed Packages

# User
activate-power-mode, v0.5.2
atom-beautify, v0.29.8
atom-material-syntax, v0.4.6
atom-material-ui, v1.2.13
color-picker, v2.1.1
emmet, v2.4.3
existdb, v0.3.3
highlight-selected, v0.11.2
hyperclick, v0.0.36
language-apache, v1.5.0
language-dot, v1.6.0
language-ejs, v0.2.0
language-freemarker, v0.2.0
language-latex, v0.6.1
language-lisp, v0.2.0
language-plantuml, v0.2.0
language-prolog, v0.10.0
language-racket, v0.4.0
language-restructuredtext, v0.16.0
language-rst, v0.2.1-0
language-scala, v1.1.6
latexer, v0.3.0
linter, v1.11.14
linter-chktex, v1.3.0
linter-csslint, v1.3.2
linter-scalac, v1.4.2
minimap, v4.24.6
minimap-linter, v1.1.1
minimap-selection, v4.4.0
open-recent, v5.0.0
pigments, v0.29.2
plantuml-viewer, v0.7.0
pretty-json, v1.4.1
rst-preview, v1.3.1

# Dev
No dev packages

Uncaught Error: Invalid XML: <h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>

[Enter steps to reproduce:]

  1. run xquery in atom that runs fine in exide

Atom: 1.20.1 x64
Electron: 1.6.9
OS: Mac OS X 10.12.6
Thrown From: existdb package 0.6.0

Stack Trace

Uncaught Error: Invalid XML:

Bad Message 414

reason: URI Too Long

At /Users/HALmob/.atom/packages/existdb/node_modules/jquery/dist/jquery.js:253

Error: Invalid XML: <h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>
    at Function.error (/packages/existdb/node_modules/jquery/dist/jquery.js:253:9)
    at Function.jQuery.parseXML (/packages/existdb/node_modules/jquery/dist/jquery.js:7983:10)
    at Request._callback (/packages/existdb/lib/existdb.coffee:146:30)
    at Request.self.callback (/packages/atom-beautify/node_modules/request/request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at /packages/atom-beautify/node_modules/request/request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at /packages/atom-beautify/node_modules/request/request.js:1091:12)
    at Object.onceWrapper (events.js:290:19)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Commands

     -3:16.9.0 core:save (input.hidden-input)
  3x -3:14.7.0 core:move-left (input.hidden-input)
  2x -3:13.2.0 core:save (input.hidden-input)
  2x -3:00.9.0 core:backspace (input.hidden-input)
     -2:41.6.0 core:save (input.hidden-input)
     -2:32.5.0 core:delete (input.hidden-input)
     -2:31.6.0 core:save (input.hidden-input)
     -1:16.5.0 find-and-replace:show (input.hidden-input)
  2x -0:55.1.0 core:backspace (input.hidden-input)
     -0:49 core:save (input.hidden-input)
     -0:47.5.0 find-and-replace:show (input.hidden-input)
     -0:38.5.0 core:save (input.hidden-input)
     -0:35.8.0 existdb:run (input.hidden-input)
     -0:29.6.0 find-and-replace:show (input.hidden-input)
     -0:17.7.0 core:save (input.hidden-input)
  2x -0:15.6.0 existdb:run (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.5 
atom-live-server 2.1.2 
autocomplete-xml 0.9.4 
build 0.68.0 
build-sassc 0.8.2 
busy 0.7.0 
busy-signal 1.4.3 
emmet 2.4.3 
existdb 0.6.0 
file-icons 2.1.12 
htmlhint 1.1.4 
hyperclick 0.1.5 
intentions 1.1.5 
language-jsoniq 1.8.0 
linter 2.2.0 
linter-autocomplete-jing 0.8.2 
linter-markdown 5.2.0 
linter-ui-default 1.6.10 
logo-file-icons 1.12.0 
markdown-image-helper 1.0.4 
merge-conflicts 1.4.5 
minimap 4.29.7 
open-html-in-browser 0.2.0 
pigments 0.40.2 
project-manager 3.3.5 
tablr 1.8.3 
todo-show 2.1.0 
wordcount 2.10.4 
xml-common-schemata 0.0.3 
xml-tools 0.2.1 
Zen 0.18.0 
zotero-citations 0.19.1 

Uncaught TypeError: Cannot read property 'getPath' of undefined

[Enter steps to reproduce:]

  1. Add a project without a .existdb.json file (via File > Add Project)
  2. Select Packages > existdb > Edit Configuration for the Current Project - and see the error.

I expected either (a) a message saying that there is no configuration available for the current project and/or (b) opening a blank configuration file.

Atom: 1.15.0 x64
Electron: 1.3.13
OS: Mac OS X 10.12.3
Thrown From: existdb package 0.4.1

Stack Trace

Uncaught TypeError: Cannot read property 'getPath' of undefined

At /Users/joe/.atom/packages/existdb/lib/project-config.coffee:36

TypeError: Cannot read property 'getPath' of undefined
    at /packages/existdb/lib/project-config.coffee:36:48)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:3:59)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/app.asar/src/atom-environment.js:1162:28)
    at EventEmitter.outerCallback (/app.asar/src/application-delegate.js:312:25)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -0:21.3.0 settings-view:open (atom-pane.pane.active)
     -0:12.6.0 existdb:create-configuration-for-selected (span.name.icon.icon-repo)
     -0:05.7.0 existdb:create-configuration-for-current (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Non-Core Packages

existdb 0.4.1 
hyperclick 0.0.40 
linter 1.11.23 

Failed to activate the existdb package

[Enter steps to reproduce:]

  1. install existdb package from package manager
  2. restart Atom

Atom: 1.21.1 x64
Electron: 1.6.15
OS: Mac OS X 10.12.6
Thrown From: existdb package 0.6.0

Stack Trace

Failed to activate the existdb package

At Attempt to change mapping for "tei" extension from "application/tei xml" to "application/xml". Pass `force=true` to allow this, otherwise remove "tei" from the list of extensions for "application/xml".

Error: Attempt to change mapping for "tei" extension from "application/tei xml" to "application/xml". Pass `force=true` to allow this, otherwise remove "tei" from the list of extensions for "application/xml".
    at Mime.define (/packages/existdb/node_modules/mime/Mime.js:32:17)
    at /packages/existdb/lib/existdb-tree-view.coffee:22:18)
    at Object.activate (/packages/existdb/lib/existdb.coffee:38:25)
    at Package.module.exports.Package.activateNow (/Users/username/Applications/Atom.app/Contents/Resources/app/src/package.js:253:25)
    at /Users/username/Applications/Atom.app/Contents/Resources/app/src/package.js:225:38
    at Package.module.exports.Package.measure (/Users/username/Applications/Atom.app/Contents/Resources/app/src/package.js:99:21)
    at /Users/username/Applications/Atom.app/Contents/Resources/app/src/package.js:218:32
    at Package.module.exports.Package.activate (/Users/username/Applications/Atom.app/Contents/Resources/app/src/package.js:215:40)
    at PackageManager.activatePackage (/Users/username/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:690:42)
    at config.transactAsync (/Users/username/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:665:36)
    at Config.module.exports.Config.transactAsync (/Users/username/Applications/Atom.app/Contents/Resources/app/src/config.js:367:24)
    at PackageManager.activatePackages (/Users/username/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:663:23)
    at PackageManager.activate (/Users/username/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:646:50)
    at /Users/username/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:854:36

Commands

Non-Core Packages

atom-ide-ui 0.5.1 
existdb 0.6.0 
minimap 4.29.7 

Failed to load the existdb package

This is different from #11

[Enter steps to reproduce:]

  1. Start Atom

Atom: 1.14.4 x64
Electron: 1.3.13
OS: Mac OS X 10.11.6
Thrown From: existdb package 0.4.1

Stack Trace

Failed to load the existdb package

At Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".


EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".

    at Ajv.localCompile (/packages/existdb/node_modules/ajv/lib/compile/index.js:139:26)
    at Ajv.resolve (/packages/existdb/node_modules/ajv/lib/compile/resolve.js:53:19)
    at Object.resolveRef (/packages/existdb/node_modules/ajv/lib/compile/index.js:210:21)
    at /packages/existdb/node_modules/ajv/lib/dotjs/ref.js:22:22)
    at /packages/existdb/node_modules/ajv/lib/dotjs/validate.js:156:37)
    at /packages/existdb/node_modules/ajv/lib/dotjs/properties.js:199:26)
    at generate_validate (/packages/existdb/node_modules/ajv/lib/dotjs/validate.js:229:37)
    at localCompile (/packages/existdb/node_modules/ajv/lib/compile/index.js:99:22)
    at Ajv.compile (/packages/existdb/node_modules/ajv/lib/compile/index.js:67:13)
    at _compile (/packages/existdb/node_modules/ajv/lib/ajv.js:328:29)
    at getSchema (/packages/existdb/node_modules/ajv/lib/ajv.js:192:51)
    at validate (/packages/existdb/node_modules/ajv/lib/ajv.js:91:11)
    at validateSchema (/packages/existdb/node_modules/ajv/lib/ajv.js:162:19)
    at _addSchema (/packages/existdb/node_modules/ajv/lib/ajv.js:288:7)
    at addSchema (/packages/existdb/node_modules/ajv/lib/ajv.js:133:26)
    at addInitialSchemas (/packages/existdb/node_modules/ajv/lib/ajv.js:396:39)
    at /packages/existdb/node_modules/ajv/lib/ajv.js:78:3)
    at /packages/existdb/node_modules/har-validator/lib/node4/promise.js:43:11)
    at Module._compile (/app.asar/src/native-compile-cache.js:109:30)
    at /app.asar/src/compile-cache.js:216:21)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (/app.asar/src/native-compile-cache.js:50:27)
    at /packages/existdb/node_modules/request/lib/har.js:5:16)
    at Module._compile (/app.asar/src/native-compile-cache.js:109:30)
    at /app.asar/src/compile-cache.js:216:21)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)

Commands

     -0:07.4.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)

Non-Core Packages

advanced-open-file 0.16.5 
atom-runner 2.7.1 
atom-wrap-in-tag 0.6.0 
autocomplete-modules 1.6.7 
document-outline 1.1.3 
existdb 0.4.1 
file-icons 2.0.17 
git-plus 7.3.3 
hyperclick 0.0.40 
language-blade 0.28.1 
language-nginx 0.6.2 
language-powershell 4.0.0 
laravel 0.7.1 
linter 1.11.23 
linter-php 1.3.1 
markdown-pdf 1.5.0 
markdown-preview-enhanced 0.10.1 
markdown-writer 2.6.4 
nord-atom-ui 0.10.1 
pdf-view 0.55.0 
pigments 0.39.0 
project-manager 3.3.3 
sync-settings 0.8.1 
todo-show 1.11.0 
tool-bar 1.0.1 
tool-bar-markdown-writer 0.2.0 

High CPU usage even when idle

Whenever I have a project open with a .existdb.json file, the atom-existdb process regularly runs in excess of 120% CPU usage (on a quad-core 3.4 GHz Intel Core i7):

screen shot 2017-06-10 at 6 04 36 pm

  • macOS 10.12.5
  • atom 1.17.2
  • atom-existdb master (b993f7b)

I wonder if there's a way to reduce the CPU usage of the listener?

Failed to access database

If I try to connect/reconnect to the DB, information bubble is shown. I have no idea what is going about here. I tried to allow REST on the server but it didn’t help.

Error: Invalid URI "https//my.server.cz/rest/db?_query=xquery%20version%20%223.0%22;%0A%0Adeclare%20namespace%20expath=%22http://expath.org/ns/pkg%22;%0Adeclare%20namespace%20output=%22http://www.w3.org/2010/xslt-xquery-serialization%22;%0Adeclare%20option%20output:method%20%22json%22;%0Adeclare%20option%20output:media-type%20%22application/json%22;%0A%0Aif%20(%22http://exist-db.org/apps/atom-editor%22%20=%20repo:list())%20then%0A%20%20%20%20let%20$data%20:=%20repo:get-resource(%22http://exist-db.org/apps/atom-editor%22,%20%22expath-pkg.xml%22)%0A%20%20%20%20let%20$xml%20:=%20parse-xml(util:binary-to-string($data))%0A%20%20%20%20return%0A%20%20%20%20%20%20%20%20if%20($xml/expath:package/@version%20=%20%220.2.8%22)%20then%0A%20%20%20%20%20%20%20%20%20%20%20%20true()%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%20%20%20%20$xml/expath:package/@version/string()%0Aelse%0A%20%20%20%20false()&_wrap=no"

atom sync support

It is not clear if atom supports syncing between apps, whose local folder structure is not identical to that of the deployed expath package. E.g. maven or webpack build usually have a /src folder where index.html resides during development, and is only copied to the top level inside the compressed .xar package.

Should this work, if so how should users set this up, without having to manually select a destination for each individual file, do we need a new feature ?

Uncaught TypeError: Cannot read property 'find' of undefined

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.15.0 x64
Electron: 1.3.13
OS: Microsoft Windows 10 Pro
Thrown From: existdb package 0.5.0

Stack Trace

Uncaught TypeError: Cannot read property 'find' of undefined

At C:\Users\pari.EXETERPM\.atom\packages\existdb\lib\tree-view.coffee:131

TypeError: Cannot read property 'find' of undefined
    at TreeView.module.exports.TreeView.TreeView.getSelected (/packages/existdb/lib/tree-view.coffee:131:18)
    at EXistTreeView.module.exports.EXistTreeView.uploadSelected (/packages/existdb/lib/existdb-tree-view.coffee:393:38)
    at /packages/existdb/lib/existdb-tree-view.coffee:94:18)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:3:59)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/app.asar/src/atom-environment.js:1168:28)
    at EventEmitter.outerCallback (/app.asar/src/application-delegate.js:325:25)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -2:10.2.0 existdb:create-configuration-for-selected (span.name.icon.icon-file-directory)
     -1:50.7.0 intentions:highlight (input.hidden-input)
  2x -1:50.3.0 core:paste (input.hidden-input)
     -1:49.4.0 core:undo (input.hidden-input)
     -1:48.6.0 core:paste (input.hidden-input)
     -1:42.9.0 core:move-right (input.hidden-input)
     -1:42.2.0 editor:select-to-end-of-word (input.hidden-input)
     -1:41.8.0 intentions:highlight (input.hidden-input)
  2x -1:41.6.0 editor:select-to-end-of-word (input.hidden-input)
  2x -1:40.8.0 core:backspace (input.hidden-input)
     -1:38.7.0 intentions:highlight (input.hidden-input)
     -1:38.4.0 core:save (input.hidden-input)
     -1:12.8.0 intentions:highlight (input.hidden-input)
     -1:12.6.0 core:save (input.hidden-input)
     -0:39.3.0 existdb:upload-selected (span.name.icon.icon-file-text)

Non-Core Packages

busy-signal 1.3.0 
existdb 0.5.0 
hyperclick 0.0.40 
intentions 1.1.2 
linter 2.1.0 
linter-ui-default 1.2.1 

Object.dirname is deprecated.

Flagged by atom's Deprecation Cop:

Argument to path.dirname must be a string

Object.dirname (/Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:9:10)
Object.getCollectionPaths (/Users/joe/workspace/atom-existdb/lib/util.coffee:163:27)
Object.run (/Users/joe/workspace/atom-existdb/lib/existdb.coffee:186:30)
HTMLElement.subscriptions.add.atom.commands.add.existdb:run (/Users/joe/workspace/atom-existdb/lib/existdb.coffee:73:26)
CommandRegistry.handleCommandEvent (<embedded>:23521:36)
CommandRegistry.dispatch (<embedded>:23406:23)

File path to query-results file is always top project from projects list.

In existdb/lib/existdb.coffee there is reference to the file "query-results" which is created whenever an xquery script is run in any of several project folders.

Line 158: promise = atom.workspace.open("query-results", { split: "down", activatePane: false })

However, the creation of the query-results filepath does not recognise that there might be multiple projects in Tree View (I have Atom package projects-manager installed). The query-result file is always placed in the top project folder, ignoring the project path where xquery was run. The query-result file should be saved in the launching project folder.

As a workaround I have made my topmost project β€œquery-results” and this is where the single query-results are now saved for all queries across all projects. Ideally the path for query-results should be available on a per project basis. It might also be useful in settings if the name query-results also had options to append the name of the initiating xquery file. And/or the date/time of query. Thus, there could be a log of xquery results.

Uncaught TypeError: Cannot read property 'sync' of undefined

steps to reproduce:

  1. working in a non exist-db project
  2. used git fetch
  3. don't know yet what or how

Atom: 1.24.1 x64
Electron: 1.6.16
OS: Mac OS X 10.13.3
Thrown From: existdb package 0.8.0

Stack Trace

Uncaught TypeError: Cannot read property 'sync' of undefined

At /Users/halalpha/.atom/packages/existdb/lib/sync.js:22

TypeError: Cannot read property 'sync' of undefined
    at /packages/existdb/lib/sync.js:22:39
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at didChangeCallback (/Applications/Atom.app/Contents/Resources/app/src/project.js:357:28)
    at PathWatcher.onNativeEvents (/Applications/Atom.app/Contents/Resources/app/src/path-watcher.js:671:15)
    at /Applications/Atom.app/Contents/Resources/app/src/path-watcher.js:567:31
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at NativeWatcher.onEvents (/Applications/Atom.app/Contents/Resources/app/src/path-watcher.js:448:26)
    at handler (/Applications/Atom.app/Contents/Resources/app/src/path-watcher.js:177:15)

Commands

Non-Core Packages

atom-beautify 0.32.0 
atom-bootstrap3 1.2.12 
atom-html-preview 0.2.5 
atom-live-server 2.2.0 
atom-xmlvalidate 0.5.0 
atom-xsltransform 1.0.0 
autocomplete-bibtex 1.2.1 
busy-signal 1.4.3 
emmet 2.4.3 
existdb 0.8.0 
file-icons 2.1.17 
hyperclick 0.1.5 
intentions 1.1.5 
language-jsoniq 1.8.0 
linter 2.2.0 
linter-autocomplete-jing 0.8.2 
linter-markdown 5.2.0 
linter-ui-default 1.7.1 
linter-xmllint 1.4.3 
logo-file-icons 1.13.0 
markdown-footnote 1.1.0 
minimap 4.29.8 
pigments 0.40.2 
platformio-ide-terminal 2.8.0 
tablr 1.8.3 
teletype 0.9.0 
wordcount 2.10.4 
xml-common-schemata 0.0.3 
xml-tools 0.2.1 

Uncaught Error: Invalid XML: <html><head><title>XQueryServlet Error</title><link rel="stylesheet"...

[Enter steps to reproduce:]

  1. Enter the following query into a new window (with Edit > Grammar > XQuery):
hc:send-request(<http:request href="https://history.state.gov/open/frus-latest.xml" method="get"/>)
  1. Hit ctrl-return to submit the query.

Atom: 1.14.3 x64
Electron: 1.3.13
OS: Mac OS X 10.12.3
Thrown From: existdb package 0.4.1

Stack Trace

Uncaught Error: Invalid XML: <title>XQueryServlet Error</title>

Error found

Message: Error
err:XPST0081 No namespace defined for prefix http [at line 1, column 18, source: hc:send-request()]
At /Users/joe/.atom/packages/existdb/node_modules/jquery/dist/jquery.js:253

Error: Invalid XML: <html><head><title>XQueryServlet Error</title><link rel="stylesheet" type="text/css" href="error.css"></link></head><body><h1>Error found</h1>
<div class='message'><b>Message: </b>Error</div><div class='description'><pre>err:XPST0081 No namespace defined for prefix http [at line 1, column 18, source: hc:send-request(<http:request href="https://history.state.gov/open/frus-latest.xml" method="get"/>)]</pre></div></body></html>
    at Function.error (/packages/existdb/node_modules/jquery/dist/jquery.js:253:9)
    at Function.jQuery.parseXML (/packages/existdb/node_modules/jquery/dist/jquery.js:7983:10)
    at Request._callback (/packages/existdb/lib/existdb.coffee:139:30)
    at Request.self.callback (/packages/existdb/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at /packages/existdb/node_modules/request/request.js:1081:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at /packages/existdb/node_modules/request/request.js:1001:12)
    at IncomingMessage.g (events.js:286:16)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Commands

  2x -1:09.5.0 core:backspace (input.hidden-input)
     -1:08.0 core:move-right (input.hidden-input)
  2x -1:05.7.0 core:backspace (input.hidden-input)
     -1:03.5.0 core:move-right (input.hidden-input)
  2x -1:01.8.0 existdb:run (input.hidden-input)
     -0:40.2.0 application:new-file (input.hidden-input)
     -0:38.9.0 core:close (input.hidden-input)
     -0:36.8.0 application:new-file (input.hidden-input)
     -0:35.6.0 editor:split-selections-into-lines (input.hidden-input)
  2x -0:33.8.0 core:backspace (input.hidden-input)
     -0:31.2.0 editor:select-line (input.hidden-input)
  2x -0:28.2.0 editor:split-selections-into-lines (input.hidden-input)
     -0:15.9.0 grammar-selector:show (input.hidden-input)
     -0:14.7.0 core:confirm (input.hidden-input)
  2x -0:11.1.0 core:backspace (input.hidden-input)
  2x -0:06.1.0 existdb:run (input.hidden-input)

Non-Core Packages

existdb 0.4.1 
hyperclick 0.0.40 
linter 1.11.23 

Uncaught TypeError: Cannot read property 'line' of undefined

[Enter steps to reproduce:]

  1. Clone atom-existdb (current develop), apm install, apm link
  2. Start atom, install atom-editor server side app
  3. File > New
  4. Edit > Select Grammar > XQuery
  5. Cmd-alt-i to bring up import module dialog - which succeeds (and is great!)
  6. Select console module from list of available modules - which triggers this error

Atom: 1.17.2 x64
Electron: 1.3.15
OS: Mac OS X 10.12.5
Thrown From: existdb package 0.5.0

Stack Trace

Uncaught TypeError: Cannot read property 'line' of undefined

At /Users/joe/workspace/atom-existdb/lib/xq-prolog.js:22

TypeError: Cannot read property 'line' of undefined
    at XQueryProlog.addImport (/Users/joe/workspace/atom-existdb/lib/xq-prolog.js:22:79)
    at ImportsView.confirm (/Users/joe/workspace/atom-existdb/lib/imports.js:51:16)
    at SelectListView.confirmSelection (/Users/joe/workspace/atom-existdb/node_modules/atom-select-list/src/select-list-view.js:303:20)
    at HTMLDivElement.core:confirm (/Users/joe/workspace/atom-existdb/node_modules/atom-select-list/src/select-list-view.js:64:14)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:1)
    at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:1
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:610:1)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:401:1)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:100:1)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:3:1)

Commands

     -0:36.9.0 snippets:expand (atom-text-editor.editor.is-focused)
  2x -0:35.6.0 core:move-down (input.hidden-input)
     -0:31.9.0 intentions:highlight (input.hidden-input)
     -0:30.7.0 existdb:import-module (input.hidden-input)
     -0:26.4.0 core:backspace (input.hidden-input)
     -0:25.6.0 core:confirm (input.hidden-input)
     -0:14.8.0 core:move-down (input.hidden-input)
     -0:14.4.0 editor:newline (input.hidden-input)
     -0:13.3.0 autocomplete-plus:confirm (input.hidden-input)
     -0:13.3.0 snippets:expand (atom-text-editor.editor.is-focused)
  4x -0:10.9.0 core:move-up (input.hidden-input)
     -0:09.7.0 core:move-down (input.hidden-input)
  2x -0:09.4.0 editor:newline (input.hidden-input)
     -0:08.4.0 core:move-up (input.hidden-input)
     -0:06.6.0 existdb:import-module (input.hidden-input)
     -0:04.3.0 core:confirm (input.hidden-input)

Non-Core Packages

busy-signal 1.4.1 
existdb 0.5.0 
hyperclick 0.0.40 
intentions 1.1.2 
linter 2.1.4 
linter-ui-default 1.6.0 

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Error: Duplicate key 'ctrl-shift-r'

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.12.6
Electron Version: 1.3.9
System: Microsoft Windows 10 Home
Thrown From: existdb package, v0.3.3

Stack Trace

Failed to load the existdb package

At Duplicate key 'ctrl-shift-r'

Error: Duplicate key 'ctrl-shift-r'
  at Object.detectDuplicateKeys (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\season\lib\cson.js:268:13)
  at C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:115:38
  at Array.reduce (native)
  at Obj (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:107:30)
  at transformNode (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:197:12)
  at Value (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:79:14)
  at transformNode (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:197:12)
  at C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:114:17
  at Array.reduce (native)
  at Obj (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:107:30)
  at transformNode (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:197:12)
  at Value (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:79:14)
  at transformNode (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:197:12)
  at Block (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:76:14)
  at transformNode (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:197:12)
  at Object.parse (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\cson-parser\lib\parse.js:203:12)
  at parseObject (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\season\lib\cson.js:42:23)
  at parseContentsSync (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\season\lib\cson.js:68:16)
  at Object.readFileSync (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\season\lib\cson.js:170:14)
  at C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\src\package.js:387:38
  at Array.map (native)
  at Package.module.exports.Package.loadKeymaps (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\src\package.js:384:46)
  at C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\src\package.js:110:19
  at Package.module.exports.Package.measure (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\src\package.js:92:15)
  at Package.module.exports.Package.load (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\src\package.js:106:12)
  at PackageManager.module.exports.PackageManager.loadPackage (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\src\package-manager.js:466:14)
  at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\src\package-manager.js:546:30)
  at C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\settings-view\lib\package-manager.js:439:29
  at exit (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\settings-view\lib\package-manager.js:73:16)
  at triggerExitCallback (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\src\buffered-process.js:215:47)
  at ChildProcess.<anonymous> (C:\Users\testUser\AppData\Local\atom\app-1.12.6\resources\app.asar\src\buffered-process.js:237:18)
  at emitTwo (events.js:106:13)
  at ChildProcess.emit (events.js:191:7)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

Commands

     -5:26 settings-view:open (atom-pane.pane.active)
     -4:50.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "packagesWithKeymapsDisabled": [
      "lisp-paredit"
    ],
    "telemetryConsent": "no"
  }
}

Installed Packages

# User
existdb, v0.3.3 (inactive)
ink, vundefined (inactive)
lisp-paredit, v0.5.4 (active)
Parinfer, v1.16.0 (active)
proto-repl, v1.4.9 (active)
tool-bar, v1.0.1 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.45.0 (inactive)
base16-tomorrow-dark-theme, v1.3.0 (inactive)
base16-tomorrow-light-theme, v1.3.0 (inactive)
one-dark-ui, v1.6.2 (active)
one-light-ui, v1.6.2 (inactive)
one-dark-syntax, v1.5.0 (active)
one-light-syntax, v1.5.0 (inactive)
solarized-dark-syntax, v1.0.5 (inactive)
solarized-light-syntax, v1.0.5 (inactive)
about, v1.7.0 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.13.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.4 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.2 (active)
command-palette, v0.39.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.202.2 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.158.8 (active)
metrics, v1.1.2 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.1 (inactive)
settings-view, v0.243.1 (active)
snippets, v1.0.4 (active)
spell-check, v0.68.4 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.2 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.210.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.35.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.54.0 (active)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.0 (active)
language-csharp, v0.13.0 (active)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (active)
language-html, v0.47.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (active)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (active)
language-ruby, v0.70.2 (active)
language-ruby-on-rails, v0.25.1 (active)
language-sass, v0.57.0 (active)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (active)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)

# Dev
No dev packages

Uncaught TypeError: Cannot read property 'onSelect' of undefined

[Enter steps to reproduce:]

  1. Open Atom or try to reconnect to a distant DB. During connecting to the database, the final step throws this. The suspicious hint could also be it asks me whether I wish to Install server-side support app (2Γ—) but below the question is always the whole HTML code of my Home page (in the app).

Atom: 1.25.0-beta2 ia32
Electron: 1.7.11
OS: Unknown Windows version
Thrown From: existdb package 0.8.0

Stack Trace

Uncaught TypeError: Cannot read property 'onSelect' of undefined

At D:\C_temp\Atom\atom_custom_storage\packages\existdb\lib\existdb-tree-view.coffee:173

TypeError: Cannot read property 'onSelect' of undefined
    at Request._callback (/packages/existdb/lib/existdb-tree-view.coffee:173:39)
    at Request.self.callback (/packages/existdb/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at /packages/existdb/node_modules/request/request.js:1163:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at /packages/existdb/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:293:19)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Commands

  3x -4:20 settings-view:open (ul.list-inline.tab-bar.inset-panel)
  2x -3:58.7.0 core:confirm (input.hidden-input)
     -2:05.2.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-caprice-dark-syntax.theme-one-dark-ui)

Non-Core Packages

atom-ide-ui 0.9.2 
atom-material-syntax 1.0.8 
atom-material-syntax-dark 1.0.0 
atom-material-ui 2.1.3 
atom-runner 2.7.1 
atom-ternjs 0.18.3 
busy-signal 1.4.3 
caprice-dark-syntax 2.0.0 
deep-purple-syntax 0.2.18 
duotone-dark-sky-syntax 2.1.0 
existdb 0.8.0 
hyperclick 0.0.0 
ide-java 0.8.1 
ide-typescript 0.7.5 
idle-theme 0.1.0 
intentions 1.1.5 
joehannes-steampunk-ui 0.2.11 
linter 2.2.0 
linter-ui-default 1.6.10 
monokai 0.24.0 
script 3.17.3 
steam-pirate-ui 0.6.1 

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Failed to load the existdb package

[Enter steps to reproduce:]

  1. install on MacOSX, just install plugin

Atom: 1.14.0 x64
Electron: 1.3.13
OS: Mac OS X 10.12.3
Thrown From: existdb package 0.3.3

Stack Trace

Failed to load the existdb package

At Duplicate key 'ctrl-shift-r'

Error: Duplicate key 'ctrl-shift-r'
    at Object.detectDuplicateKeys (/app.asar/node_modules/season/lib/cson.js:268:13)
    at /app.asar/node_modules/cson-parser/lib/parse.js:115:38
    at Array.reduce (native)
    at Obj (/app.asar/node_modules/cson-parser/lib/parse.js:107:30)
    at transformNode (/app.asar/node_modules/cson-parser/lib/parse.js:197:12)
    at Value (/app.asar/node_modules/cson-parser/lib/parse.js:79:14)
    at transformNode (/app.asar/node_modules/cson-parser/lib/parse.js:197:12)
    at /app.asar/node_modules/cson-parser/lib/parse.js:114:17
    at Array.reduce (native)
    at Obj (/app.asar/node_modules/cson-parser/lib/parse.js:107:30)
    at transformNode (/app.asar/node_modules/cson-parser/lib/parse.js:197:12)
    at Value (/app.asar/node_modules/cson-parser/lib/parse.js:79:14)
    at transformNode (/app.asar/node_modules/cson-parser/lib/parse.js:197:12)
    at Block (/app.asar/node_modules/cson-parser/lib/parse.js:76:14)
    at transformNode (/app.asar/node_modules/cson-parser/lib/parse.js:197:12)
    at Object.parse (/app.asar/node_modules/cson-parser/lib/parse.js:203:12)
    at parseObject (/app.asar/node_modules/season/lib/cson.js:42:23)
    at parseContentsSync (/app.asar/node_modules/season/lib/cson.js:68:16)
    at Object.readFileSync (/app.asar/node_modules/season/lib/cson.js:170:14)
    at /app.asar/src/package.js:439:38
    at Array.map (native)
    at Package.module.exports.Package.loadKeymaps (/app.asar/src/package.js:436:46)
    at /app.asar/src/package.js:114:19
    at Package.module.exports.Package.measure (/app.asar/src/package.js:96:15)
    at Package.module.exports.Package.load (/app.asar/src/package.js:110:12)
    at PackageManager.module.exports.PackageManager.loadPackage (/app.asar/src/package-manager.js:468:14)
    at PackageManager.module.exports.PackageManager.activatePackage (/app.asar/src/package-manager.js:548:30)
    at /app.asar/node_modules/settings-view/lib/package-manager.js:439:29
    at exit (/app.asar/node_modules/settings-view/lib/package-manager.js:69:16)
    at triggerExitCallback (/app.asar/src/buffered-process.js:303:11)
    at /app.asar/src/buffered-process.js:316:11
    at /app.asar/src/buffered-process.js:185:9)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)

Commands

Non-Core Packages

existdb 0.3.3 
hyperclick 0.0.40 
linter 1.11.21 

Object.extname is deprecated.

Flagged by atom's Deprecation Cop:

Argument to path.extname must be a string

Object.extname (/Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:20:10)
Object.getText (/Users/joe/workspace/atom-existdb/lib/xquery-helper.coffee:267:17)
Object.run (/Users/joe/workspace/atom-existdb/lib/existdb.coffee:192:23)
HTMLElement.subscriptions.add.atom.commands.add.existdb:run (/Users/joe/workspace/atom-existdb/lib/existdb.coffee:73:26)
CommandRegistry.handleCommandEvent (<embedded>:23521:36)
CommandRegistry.dispatch (<embedded>:23406:23)

Uncaught TypeError: Cannot read property 'type' of undefined

[Enter steps to reproduce:]

  1. The one problem I have right now is failing to upload from Atom an *.xml file to a target collection in a running instance of eXist-db.

  2. I have Atom package existdb installed, eXist-db running, and I can see eXist-db tree view in Atom right pane. I am assuming from the Readme.md that this package is identical to atom-existdb.

  3. I did inspect the eXist Database tree-view and I see /db/apps/atom-editor/ installed

  4. In there I see the file .existdb.json and there are localhost default settings.
    I had to set these to be identical to those I had previously setup in Atom existdb configuration.
    Then in Atom I reapplied Packages > existdb > Reconnect
    Unfortunately that did not cure the problem of not being able to upload an Atom xml file to a collection.

  5. I select a target collection (folder) in eXist-db tree view.
    I place my cursor in xml file to be uploaded.
    I then go to Packages > existdb > Upload Current File
    and I get this error message as set out below. ...

Uncaught TypeError: Cannot read property 'type' of undefined
/home/dl/.atom/packages/existdb/lib/existdb-tree-view.coffee:390

  1. I tried uploading the file directly (without Atom) as described here.
    https://exist-db.org/exist/apps/doc/uploading-files
    Collection Browser > Upload resources button
    This works as expected, so the xml file is valid and server is working.

  2. I deleted the uploaded test file using the Atom existdb client and started again through Atom existdb client. There is a full stack trace appended below ..

  3. I inspected line 390 in existdb-tree-view.coffee
    This is what I have ..

388 uploadCurrent: () =>
389 selected = @treeView.getSelected()
390 if selected.length != 1 or selected[0].item.type == "resource"
391 atom.notifications.addError("Please select a single target collection for the upload in the database tree view")
392 return

FULL REPORT FOLLOWS:
Atom: 1.29.0 x64
Electron: 2.0.5
OS: Ubuntu 16.04.5
Thrown From: existdb package 0.8.0

Stack Trace

Uncaught TypeError: Cannot read property 'type' of undefined

At /home/dl/.atom/packages/existdb/lib/existdb-tree-view.coffee:390

TypeError: Cannot read property 'type' of undefined
    at EXistTreeView.module.exports.EXistTreeView.uploadCurrent (/packages/existdb/lib/existdb-tree-view.coffee:390:57)
    at EXistTreeView.uploadCurrent (/packages/existdb/lib/existdb-tree-view.coffee:1:1)
    at /packages/existdb/lib/existdb-tree-view.coffee:95:18)
    at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/src/command-registry.js:384:49)
    at CommandRegistry.dispatch (/usr/share/atom/resources/app/src/command-registry.js:273:23)
    at AtomEnvironment.dispatchApplicationMenuCommand (/usr/share/atom/resources/app/src/atom-environment.js:1347:25)
    at EventEmitter.outerCallback (/usr/share/atom/resources/app/src/application-delegate.js:339:53)
    at emitThree (events.js:136:13)
    at EventEmitter.emit (events.js:217:7)

Commands

  3x -6:57 core:backspace (input.hidden-input)
  2x -6:33.6.0 core:save (input.hidden-input)
     -4:50.3.0 existdb:upload-current (atom-pane.pane.active)
     -4:25.4.0 existdb:reconnect (atom-pane.pane.active)
  2x -2:58.8.0 existdb:upload-current (atom-pane.pane.active)

Non-Core Packages

atom-beautify 0.33.0 
atom-ctags 5.1.2 
atom-html-preview 0.2.5 
atom-runner 2.7.1 
script 3.18.1 
atom-shell-commands 1.5.0 
atom-wrap-in-tag 0.6.0 
autocomplete-R 0.6.0 
autosave-onchange 1.5.1 
build 0.70.0 
build-rscript 0.6.2 
busy-signal 1.4.3 
counter 0.3.5 
emmet 2.4.3 
existdb 0.8.0 
file-icons 2.1.24 
Hydrogen 2.5.1 
hyperclick 0.1.5 
intentions 1.1.5 
language-markdown 0.26.0 
language-r 0.4.2 
latex 0.50.0 
linter 2.2.0 
linter-ui-default 1.7.1 
markdown-footnote 1.1.5 
markdown-preview-enhanced 0.15.6 
markdown-preview-plus 3.5.0 
markdown-table-editor 1.1.1 
markdown-writer 2.9.0 
process-palette 0.17.0 
project-manager 3.3.6 
r-exec 0.5.0 
scribus-composer 0.0.0 
sourcefetch 0.1.0 
svg-preview 0.12.1 
tidy-markdown 3.0.1 
tool-bar 1.1.7 
tool-bar-markdown-writer 0.4.0 
wordcount 3.0.0 

[BUG] build fails on AArch64, Fedora 33

Built apm from source. Installed electron using npm.

[jw@cn06 atom]$ /data/jw/apm/bin/apm install
/data/jw/apm/lib/command.js:148
throw new Error('Could not determine Electron version');
^

Error: Could not determine Electron version
at /data/jw/apm/lib/command.js:148:19
at /data/jw/apm/lib/command.js:166:20
at /data/jw/apm/lib/apm.js:95:20
at processTicksAndRejections (internal/process/task_queues.js:82:9)
[jw@cn06 atom]$

Use new intentions integration from atom linter v2

See http://steelbrain.me/2017/03/13/linter-v2-released.html, under "Intentions Integration" (among other really nice new features):

Linter now fully integrates with the intentions package. This allows providers to use solutions in v2 and fix in v1 to allow the users to fix the issue without leaving the comfort of their Atom Editor.

I imagine this would be a nice way to auto-suggest module and namespace imports, as eXide does, e.g.:

existdb-atom tells you there's a missing module import:

screen shot 2017-03-14 at 10 16 30 am

but eXide offers to fix it:

screen shot 2017-03-14 at 10 17 53 am

Similarly, existdb-atom could borrow eXide's approach to fixing namespace declarations:

screen shot 2017-03-14 at 10 18 51 am

screen shot 2017-03-14 at 10 19 13 am

store in sync.js called twice

Having Sync on in Atom.

Whenever I save a local file, I get a message from busy-signal:
"Status .... is already set..."
caused by line 70 in syn.js:
this.emit("status", Uploading ${file} to ${relPath} as ${contentType}...);
Not an busy-signal issue (see similar problems in busy-signal git).
Files are actually synced to eXist, no problems there.

Replacing the lines in sync.js with:
console.log('hi')
var d = new Date()
this.emit("status", Uploading ${d.getTime()}: ${file} to ${relPath} as ${contentType}...);
resolves the busy-signal error, however the console does say 'hi' twice for every save.

Seems the underlying problem is store being called twice.

Atom 1.34.0 x64 on Win10, eXist 4.3.1, atom existdb package 0.12.0

query-results are hard coded to be xml

When calling a query that returns anything other than xml, the result is displayed as xml regardless thanks to exisdb.coffee#L160

It would be nicer when working e.g. with JSON serialisation for the query results to also be displayed as JSON.

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.