Code Monkey home page Code Monkey logo

mlproj's Introduction

mlproj

Project and environment manager for MarkLogic.

All details on: http://mlproj.org/.

Install

Use the following:

npm install mlproj -g

This needs Node to be installed on your system. Package managers for all systems include it. Look at Node website for details and install options.

Features

mlproj let you manage, deploy and configure MarkLogic projects. In order to achieve this, it also let you describe your environments and automatically set them up.

Use mlproj help for an overview. Go to http://mlproj.org/ for all details.

TODO

SOURCES

  • support sources as is (only includes/excludes), in new and load
  • wrap file path list generation (filtering, all that)
  • add support for garbage (w/ default value)
  • add support for @defaults
  • test @defaults in xproject/mlproj.json and ~/.mlproj.json
  • link sources to databases and servers
  • add support for filter
  • add support for feeder
  • add URI calculation support (decl. (root, prefix...) + function)
  • add way to link to a JS file + function name (for filter, feeder, and uri)

In commands.js: // ************ // - Move these NEW_*() to files in a sub-dir, and load them. // - Transform them to give them a chance to inject some data, // asked for on the command line. // - Use different sub-dirs for different scaffoldings. // ************

  • maintain the file extensions (and their types) in the project file
  • allow command new to create projects with different scaffoldings
    • using "embedded" scaffoldings (empty, plain, complete, annotated, web, rest...)
    • using "remotes" ones (on Git repos?)
    • new can even create such scaffolding templates
    • and they can be published in a gallery
    • complete examples for outreach, or real operational scaffoldings
  • new command add to add components, indexes, etc. by answering few questions
  • new command mlcp to invoke MLCP with info from the environment files
  • new command test to run tests from command line
  • new command to install a XAR/XAW file
  • new command to install a XAR/XAW from CXAN
  • new command to publish to CXAN
  • edit environment files from the Console
  • word lexicons
  • add support for triggers in environs

Support the following scenario (e.g. for the EXPath ML Console):

# check values are correct (supported)
mlproj -e dev -h myvm -u admin -z -p port:8010 show

# setup the environment (supported)
mlproj -e dev -h myvm -u admin -z -p port:8010 setup

# deploy modules (supported)
mlproj -e dev -h myvm -u admin -z -p port:8010 deploy

# initialize the app (to support)
mlproj -e dev -h myvm -u admin -z -p port:8010 init

which could/should be made easier:

# install everything (setup + deploy + init) (to support)
mlproj -e dev -h myvm -u admin -z -p port:8010 install

mlproj's People

Contributors

fgeorges avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mlproj's Issues

mlproj should work from xproject directory

Feature request.

A feature of npm is that no matter where you run it, it always climbs the directory tree and finds the first package.json. Then it runs as though that directory is the current working directory. This works great and means you can run commands with deterministic certainty no matter what directory you run from.

For example, if you try the command npm run anywhere, it will find the package.json and list the commands available. The commands will run from that directory. This means you don't have cd back up to the top level, run your command and cd - to get back where you are. mlproj show should give the status no matter where you are.

Error installing mlproj

I followed the instructions to install from the EXPath Console readme: sudo npm install mlproj -g, and several errors occurred:

sudo npm install mlproj -g
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v67 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Users/willthompson/.nvm/versions/node/v11.1.0/lib/node_modules/mlproj/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64' 
gyp ERR! clean error 
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
...

I'm on a Mac running macOS 10.13, and my npm --version => 6.4.1. I was only able to get it to install after finding an issue for similar problem on a different package, and used this command:

sudo npm i -g mlproj --unsafe-perm=true --allow-root

.mlproj dotfile

could provide an override .mlproj in users home di which overrides things like marklogic connection details.

File path does not have any slash

OS: Windows 10
MLversion : 8.0-5.4

Getting an error message when I run:

mlproj -e prod setup

Error: File path does not have any slash: d:\Workspace\GitHub\mlsamples\abc\abc\xproject\mlenvs\prod.json

Windows pathing issue? prod.json looks like this:

{
    "mlproj": {
        "format": "0.1",
        "import": "base.json",
        "connect": {
            "host": "prod.server",
            "user": "admin"
        },
        "databases": [{
            "id": "modules",
            "name": "@{code}-modules"
        }],
        "servers": [{
            "id": "app",
            "modules": {
                "idref": "modules"
            },
            "root": "/"
        }]
    }
}

Node warning: Buffer() is deprecated due to security and usability issues

After upgrading Node to version 12.4.0, it gives me the following message when I execute mlproj:

$ mlproj deploy

--- Prepare ---
• checking the directory:           src
• checking the directory:           sec/api
• checking the directory:           src/plumbing

--- Progress ---
→ Insert documents:                 7 documents

--- Summary ---
Done:
✓ Insert documents, for 0.037 Mo:   7 documents
(node:74179) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

$ node --version
v12.4.0

This ticket is mostly to keep track of the issue and attach some info. This is not an mlproj bug.

Describe what a "project" is

When I saw this is a "project manager" I envisioned Microsoft Project. After looking at the Introduction and Getting Started, I don't think that's what this is. But while there's a lot of explanation of "how" to use it, I don't clearly understand "why" I would use it or "what" it is.

In this sentence, what is a "MarkLogic project"? "mlproj let you manage, deploy and configure MarkLogic projects"

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.