From b48f5aac8368858893cf0a72ccb44004073f0a14 Mon Sep 17 00:00:00 2001 From: wdavidw Date: Sun, 4 Aug 2024 15:20:49 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20adaltas/?= =?UTF-8?q?node-shell@f5e3cbf1d9673dd84d2e11ab8b0b40f0427a1b35=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- 404/index.html | 2 +- api/compile/index.html | 4 ++-- api/help/index.html | 4 ++-- api/helping/index.html | 4 ++-- api/index.html | 4 ++-- api/load/index.html | 4 ++-- api/parse/index.html | 4 ++-- api/route/index.html | 4 ++-- config/commands/index.html | 4 ++-- config/index.html | 4 ++-- config/load/index.html | 4 ++-- config/main/index.html | 4 ++-- config/options/index.html | 4 ++-- config/router/index.html | 4 ++-- index.html | 4 ++-- page-data/sq/d/233544656.json | 2 +- project/changelog/index.html | 4 ++-- project/contribute/index.html | 4 ++-- project/index.html | 4 ++-- project/license/index.html | 4 ++-- usage/extended/index.html | 4 ++-- usage/help/index.html | 4 ++-- usage/index.html | 4 ++-- usage/routing/index.html | 4 ++-- usage/tutorial/index.html | 4 ++-- 26 files changed, 49 insertions(+), 49 deletions(-) diff --git a/404.html b/404.html index 24a9e85..bad5d44 100644 --- a/404.html +++ b/404.html @@ -48,7 +48,7 @@ } } }) -
Bug toolGitHub

NOT FOUND

You just hit a route that doesn't exist... the sadness.

About

Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

+
Bug toolGitHub

NOT FOUND

You just hit a route that doesn't exist... the sadness.

About

Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

Bug toolGitHub

NOT FOUND

You just hit a route that doesn't exist... the sadness.

About

Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

+
Bug toolGitHub

NOT FOUND

You just hit a route that doesn't exist... the sadness.

About

Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

Bug toolGitHub
Edit on GitHub

API method `compile`

Convert data to an arguments array.

+
Bug toolGitHub
Edit on GitHub

API method `compile`

Convert data to an arguments array.

About

Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

+);
Bug toolGitHub
Edit on GitHub

API method `help`

Format the configuration into a readable documentation string.

+
Bug toolGitHub
Edit on GitHub

API method `help`

Format the configuration into a readable documentation string.

  • commands ([string] | string)
    The string or array containing the command name if any, optional.
  • @@ -153,7 +153,7 @@

    options: {}, commands: {}, } -);

About

Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

+);
View source file: api/help/example.js

Bug toolGitHub
Edit on GitHub

API method `helping`

Determine if help was requested by returning zero to n commands if help is requested or null otherwise.

+
Bug toolGitHub
Edit on GitHub

API method `helping`

Determine if help was requested by returning zero to n commands if help is requested or null otherwise.

  • params ([object] | object)
    The parameter object parsed from arguments, an object in flatten mode or an array in extended mode, optional.
  • @@ -77,7 +77,7 @@

    .stdout.write(help) process.exit() }

-

Considering the above example, the commands ./myapp help ./myapp --help and ./myapp -h print the application help. The commands ./myapp help start, ./myapp start --help and ./myapp start -h print the help of the start command.

About

Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

+

Considering the above example, the commands ./myapp help ./myapp --help and ./myapp -h print the application help. The commands ./myapp help start, ./myapp start --help and ./myapp start -h print the help of the start command.

Bug toolGitHub
Edit on GitHub

API

    Shell.js is written as an ESM package. It is also available as a CommonJS package. To import the package, uses:

    +
    Bug toolGitHub
    Edit on GitHub

    API

      Shell.js is written as an ESM package. It is also available as a CommonJS package. To import the package, uses:

      // ESM package
       import { shell } from 'shell';
       // CommonJS package
      @@ -76,7 +76,7 @@
       first argument. If the option "extended" is activated, it also receives the
       original arguments and configuration as second and third arguments. Any user
       provided arguments are transmitted as is as additional arguments.
      -

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      Bug toolGitHub
      Edit on GitHub

      API method `load`

      Description

      +
      Bug toolGitHub
      Edit on GitHub

      API method `load`

      Description

      Internal function used to load modules, see the load option to pass a function or a module referencing the function.

      Examples

      -

      TODO: Add a representative example

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +

      TODO: Add a representative example

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      Bug toolGitHub
      Edit on GitHub

      API method `parse`

      Convert an arguments list to data.

      +
      Bug toolGitHub
      Edit on GitHub

      API method `parse`

      Convert an arguments list to data.

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +}]);
      Bug toolGitHub
      Edit on GitHub

      API method `route`

      The route method dispatch command into handler functions. An handler is a function or the name of a module exporting a function. Learn more about routing in the usage documentation.

      +
      Bug toolGitHub
      Edit on GitHub

      API method `route`

      The route method dispatch command into handler functions. An handler is a function or the name of a module exporting a function. Learn more about routing in the usage documentation.

      • context: [string] | object The arguments to parse into data, accept the Node.js process instance, an argument list provided as an array of strings or the context object; optional, default to process.
      • ...users_parameters: any Additionnal parameters that will be passed to the handler function associated with a route.
      • @@ -104,7 +104,7 @@

        }) }

      The application calling the route wait for the promise to be resolved with:

      -
      await app.route(['start', '--port', 3000]

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +
      await app.route(['start', '--port', 3000]
      Bug toolGitHub
      Edit on GitHub

      Commands

      Description

      +
      Bug toolGitHub
      Edit on GitHub

      Commands

      Description

      Commands define the arguments passed to a Shell.js scripts.

      Properties

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +}
      Bug toolGitHub
      Edit on GitHub

      Configuration

      The configuration parameter is an object passed as an argument to the function which is exported by this package.

      +
      Bug toolGitHub
      Edit on GitHub

      Configuration

      The configuration parameter is an object passed as an argument to the function which is exported by this package.

      shell = require("shell")
       app = shell(config)

      The root properties

      @@ -87,7 +87,7 @@

      const config = require('/etc/my_new_app')
       const shell = require('shell')
       const app = shell(config)
      -console.log(app.parse())

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +console.log(app.parse())
      Bug toolGitHub
      Edit on GitHub

      Load usage

      Description

      +
      Bug toolGitHub
      Edit on GitHub

      Load usage

      Description

      Function or a module referencing the function to load modules, the default implementation ensure modules starting with './' are relative to process.cwd() and use require.main.require.

      Examples

      -

      TODO: Add a representative example

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +

      TODO: Add a representative example

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      Bug toolGitHub
      Edit on GitHub

      Main parameter usage

      Description

      +
      Bug toolGitHub
      Edit on GitHub

      Main parameter usage

      Description

      Main is what is left once the option and the commands have been extracted. Like with options, the main property is defined at the application level or for each command.

      Definition

      The main property is declared as an object with the following properties:

      @@ -107,7 +107,7 @@

      name: 'start', main: 'leftover' }]}]})

      -

      Usage of the "main" parameter is now: myapp server start [leftover].

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +

      Usage of the "main" parameter is now: myapp server start [leftover].

      Bug toolGitHub
      Edit on GitHub

      Options configuration

      Description

      +
      Bug toolGitHub
      Edit on GitHub

      Options configuration

      Description

      Options define the arguments passed to a shell scripts when prefixed with -- followed by their name or - followed by their shortcut alternative.

      Properties

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +}}}}})
      Bug toolGitHub
      Edit on GitHub

      Router property configuration

      The router property is an object which provide low level access to modify the behaviour of the router plugin. Learn more about routing in the usage documentation.

      +
      Bug toolGitHub
      Edit on GitHub

      Router property configuration

      The router property is an object which provide low level access to modify the behaviour of the router plugin. Learn more about routing in the usage documentation.

      -

      Note, the help command, activated by default when a first command is registered, writes by default to stderr and close the stream if stderr_end is enabled.

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +

      Note, the help command, activated by default when a first command is registered, writes by default to stderr and close the stream if stderr_end is enabled.

      Bug toolGitHub
      Node.js Parameters

      The tool for building CLI applications with Node.js

      Get startedGithub Node.js ParametersGithub
      NPM versionTravis build status

      Why Shell.js?

      Configure your CLI app

      Shell.js is simple to configure. All it takes is a declarative object describing your application. Consider it like the model of your application. It is enriched by plugins such as to route commands and to generate help screens.

      Read more

      const shell = require("shell")
      +  
      Bug toolGitHub
      Node.js Parameters

      The tool for building CLI applications with Node.js

      Get startedGithub Node.js ParametersGithub
      NPM versionTravis build status

      Why Shell.js?

      Configure your CLI app

      Shell.js is simple to configure. All it takes is a declarative object describing your application. Consider it like the model of your application. It is enriched by plugins such as to route commands and to generate help screens.

      Read more

      const shell = require("shell")
       const app = shell({
         name: "myapp",
         description: "My CLI application",
      @@ -104,7 +104,7 @@
       
       EXAMPLES
           myapp --help            Show this message
      -    myapp help              Show this message

      Installing

      The latest version of Shell.js is tested with Node.js 12, 14 and 16. New versions of Node.js shall work as well.

      Via npm:

      npm install shell

      Via git (or downloaded tarball), copy or link the project from a discoverable Node.js directory:

      git clone http://github.com/adaltas/node-shell.git

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +
      myapp help Show this message

      Installing

      The latest version of Shell.js is tested with Node.js 12, 14 and 16. New versions of Node.js shall work as well.

      Via npm:

      npm install shell

      Via git (or downloaded tarball), copy or link the project from a discoverable Node.js directory:

      git clone http://github.com/adaltas/node-shell.git

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      Bug toolGitHub
      Edit on GitHub

      Changelog

      All notable changes to this project will be documented in this file. +

      Bug toolGitHub
      Edit on GitHub

      Changelog

      All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

      0.9.1 (2022-02-17)

      Bug Fixes

      @@ -84,7 +84,7 @@

      0.8.1-alpha.5 (2020-11-23)

      Note: Version bump only for package parameters

      0.8.1-alpha.3 (2020-11-23)

      -

      Note: Version bump only for package parameters

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +

      Note: Version bump only for package parameters

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      Bug toolGitHub
      Edit on GitHub

      Contribution

      Introduction

      +
      Bug toolGitHub
      Edit on GitHub

      Contribution

      Introduction

      You are encouraged to contribute to Shell.js. The project is open sourced under the MIT license and it is hosted on GitHub. It is written and maintained by Adaltas, a consulting company based in Paris which specialized in Big Data.

      Contributions go far beyond pull requests and commits. We are thrilled to receive a variety of other contributions including the following:

      -

      This package is developed by Adaltas.

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +

      This package is developed by Adaltas.

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      Bug toolGitHub
      Edit on GitHub

      Project

      The Shell.js repository is hosted on GitHub.

      +
      Bug toolGitHub
      Edit on GitHub

      Project

      The Shell.js repository is hosted on GitHub.

      The project is sponsored by Adaltas, a consulting company located in Paris and specialized in Big Data. They provide support and training on request.

      Support

      If you’ve come across what you think is a bug or just want to make a feature request, open a new issue. Wether it is a bug report or a feature request, please spend some time to be clear and consised while providing a maximum of context.

      You can get support by posting a new issue and browsing previous ones.

      Examples

      -

      The documentation contains several example on every page. Do not hesitate to suggest us more examples and to help us improve the documentation.

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +

      The documentation contains several example on every page. Do not hesitate to suggest us more examples and to help us improve the documentation.

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      Bug toolGitHub
      Edit on GitHub

      License

      Content

      +
      Bug toolGitHub
      Edit on GitHub

      License

      Content

      Copyright (c) 2011 Adaltas

      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -64,7 +64,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +SOFTWARE.

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      Bug toolGitHub
      Edit on GitHub

      Extended mode usage

      For the sake of simplicity, the module operates by default in flatten mode. All the parameters of a multi-level command are merged toguether as one object. When parsing application arguments without commands, it doesn't make much a difference. However, when the application grew and more commands with deepest levels are created, there is a risk of collision between multiple options registering the same properties.

      +
      Bug toolGitHub
      Edit on GitHub

      Extended mode usage

      For the sake of simplicity, the module operates by default in flatten mode. All the parameters of a multi-level command are merged toguether as one object. When parsing application arguments without commands, it doesn't make much a difference. However, when the application grew and more commands with deepest levels are created, there is a risk of collision between multiple options registering the same properties.

      While being a little more verbose, the extended mode ensure that multi levels of options and main arguments can be defined with the same property name. The parameters are provided in the form of an array, one element per command.

      Flatten mode

      Consider an application which registers a "config" property for the overall application as well as a start command in flatten mode:

      @@ -102,7 +102,7 @@

      [
         { "config": "./config.yml" },
         { "command": "start", "config": "./start-config.yml" }
      -]

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +]
      Bug toolGitHub
      Edit on GitHub

      Displaying the help

      Description

      +
      Bug toolGitHub
      Edit on GitHub

      Displaying the help

      Description

      Help prints detailed information about how to use the CLI application or one of its commands.

      How to display the help

      From a user perspective, there are multiple ways to print the help to the console:

      @@ -111,7 +111,7 @@

      { options: { help: { description: 'Overwrite description' } } } -)

      About

      Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

      +)
      Bug toolGitHub
      Edit on GitHub

      Usage

          +
          Bug toolGitHub
          Edit on GitHub

          Usage

            • Tutorial
              Configure and build your first CLI application using Shell.js.
            • Help
              @@ -57,7 +57,7 @@ Merge all properties into a flatten object or a hierarchical object.
            • Routing
              Dispatch the commands of the CLI application into user provided handler function
            • -

            About

            Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

            +

          About

          Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

          Bug toolGitHub
          Edit on GitHub

          Routing

          Routing dispatch the commands of the CLI application into user provided handler functions. Handler functions are defined with the route property of the application or of a command.

          +
          Bug toolGitHub
          Edit on GitHub

          Routing

          Routing dispatch the commands of the CLI application into user provided handler functions. Handler functions are defined with the route property of the application or of a command.

          Help is automatically activated when using routing. A new help command is registered as well as the --help -h option to each commands.

          Configuration

          The router configuration property define the routing behaviour. It is available at the application level as well as for every command. Refer to the router configuration property for additional information.

          @@ -127,7 +127,7 @@

          }catch(err){ console.error(`=== ${err.message} ===`) } -})()

          About

          Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

          +})()
          Bug toolGitHub
          Edit on GitHub

          Tutorial

          Welcome to Shell.js! The goal of this tutorial is to guide you through configuring and building your first CLI application using Shell.js. Starting from scratch and go on to advanced usage of its APIs. The tutorial contains the following sections:

          +
          Bug toolGitHub
          Edit on GitHub

          Tutorial

          Welcome to Shell.js! The goal of this tutorial is to guide you through configuring and building your first CLI application using Shell.js. Starting from scratch and go on to advanced usage of its APIs. The tutorial contains the following sections:

          About

          Node.js Parameters is the tool for building CLI applications with Node.js. It is developed and supported by Adaltas.

          +app.route()