npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

anypoint-cli-api-project-plugin

v0.1.10-beta.0

Published

Api Project CLI

Downloads

18

Readme

@mulesoft/anypoint-cli-api-project-plugin

oclif Version Downloads/week License

Usage

$ npm install -g @mulesoft/anypoint-cli-api-project-plugin
$ anypoint-cli-api-project-plugin COMMAND
running command...
$ anypoint-cli-api-project-plugin (--version)
@mulesoft/anypoint-cli-api-project-plugin/1.0.0 darwin-x64 node-v16.14.2
$ anypoint-cli-api-project-plugin --help [COMMAND]
USAGE
  $ anypoint-cli-api-project-plugin COMMAND
...

Commands

anypoint-cli-api-project-plugin api-project generate

Generate a new Api Project (exchange.json file). By default, if the flag location is not present the command will create a new Api Spec with default values based on the flag values.Otherwise, the exchange.json file will be created based on the Api Specification file passed on the location flag.

USAGE
  $ anypoint-cli-api-project-plugin api-project generate --name <value> [-l <value>] [--api-version <value>] [--main
    <value>] [--json] [--classifier raml-fragment|raml|oas|oas-components|json-schema] [--format yaml|json]
    [--format-version <value>] [--group-id <value>] [--asset-id <value>] [--asset-version <value>] [--fragment-type
    trait|resource-type|library|overlay|extension|type|user-documentation|example|annotation-type|security-scheme]

FLAGS
  -l, --location=<value>    Api Spec file to for the new API Project
  --api-version=<value>     Override the default (v1) Api Version in the exchange.json descriptor file
  --asset-id=<value>        Asset Name (GAV)
  --asset-version=<value>   Asset Version (GAV)
  --classifier=<option>     [default: oas] Define the Project Type
                            <options: raml-fragment|raml|oas|oas-components|json-schema>
  --format=<option>         [default: yaml] Define Api Spec Format Type
                            <options: yaml|json>
  --format-version=<value>  Define Api Spec Format Type Version
  --fragment-type=<option>  The fragment type. Always use with --type raml-fragment, even for OAS 3.0 and JSON schema
                            fragments.This field is required if the type flag was set as raml-fragment
                            <options: trait|resource-type|library|overlay|extension|type|user-documentation|example|anno
                            tation-type|security-scheme>
  --group-id=<value>        Group Id (GAV)
  --json                    Format the default standard output to JSON
  --main=<value>            Override the default main file name
  --name=<value>            (required) Api Project Name, this will be the directory name and the default Api
                            Specification main file name

DESCRIPTION
  Generate a new Api Project (exchange.json file). By default, if the flag location is not present the command will
  create a new Api Spec with default values based on the flag values.Otherwise, the exchange.json file will be created
  based on the Api Specification file passed on the location flag.

EXAMPLES
  Generate a new Project Api from scrath named 'example-1' in the current directory, by default based on OAS
  Specification 3.0.

    $ anypoint-cli-api-project-plugin api-project generate --name=example-1

  Generate a new Project Api from scrath named 'example-2' in the current directory, based on RAML Specification 1.0.

    $ anypoint-cli-api-project-plugin api-project generate --name=example-2 --classifier=raml

  Generate a new Project Api from scrath named 'example-3' in the current directory, by default based in OAS
  Specification 3.0.

    $ anypoint-cli-api-project-plugin api-project generate --name=example-3 \
      --group-id=c8531dch-471c-479z-87ce-b3886d05b8ad --asset-id=assetName --asset-version=2.3.0

  Generate a new Project Api from scrath named 'example-4' in the LOCATION directory, by default based on OAS
  Specification 3.0.

    $ anypoint-cli-api-project-plugin api-project generate --name=example-4 --location=~/projects/example4

  Generate a new Project Api based on the Api Specification (valid.raml) specified in the location flag named
  'example-5'.

    $ anypoint-cli-api-project-plugin api-project generate --name=example-5 \
      --location=~/projects/example5/valid.raml

anypoint-cli-api-project-plugin api-project publish

Validate the Api Project syntax and rulesets and Publish the project to Exchange.

USAGE
  $ anypoint-cli-api-project-plugin api-project publish [--password <value> [--username <value> | --client_id <value> |
    ]] [--client_secret <value> ] [--bearer <value> |  | ] [--organization <value>] [--environment <value>] [--host
    <value>] [--collectMetrics] [-l <value>] [--skip-validation rulesets] [--tag <value>] [--custom-raml-tag <value>]
    [--group-id <value>] [--asset-id <value>] [--asset-version <value>] [--json]

FLAGS
  -l, --location=<value>         Path to the API Project directory to Publish
  --asset-id=<value>             Asset Name (GAV)
  --asset-version=<value>        Asset Version (GAV)
  --bearer=<value>               Token Bearer. You can define this in the ANYPOINT_BEARER environment variable.
  --client_id=<value>            Client ID. You can define this in the ANYPOINT_CLIENT_ID environment variable.
  --client_secret=<value>        Client Secret. You can define this in the ANYPOINT_CLIENT_SECRET environment variable.
  --collectMetrics               collect metrics. You can define this in the COLLECT_METRICS environment variable.
  --custom-raml-tag=<value>      Name of the custom tag defined in the Raml Api Spec, to get custom tags values
  --environment=<value>          Environment Name. You can define this in the ANYPOINT_ENV environment variable.
  --group-id=<value>             Group Id (GAV)
  --host=anypoint.mulesoft.com   [default: anypoint.mulesoft.com] Host URL. You can define this in the ANYPOINT_HOST
                                 environment variable.
  --json                         Format the default standard output to JSON
  --organization=<value>         Organization Name. You can define this in the ANYPOINT_ORG environment variable.
  --password=<value>             Password. You can define this in the ANYPOINT_PASSWORD environment variable.
  --skip-validation=<option>...  Validations to skip
                                 <options: rulesets>
  --tag=<value>...               Add tags to Api Project
  --username=<value>             Username. You can define this in the ANYPOINT_USERNAME environment variable.

DESCRIPTION
  Validate the Api Project syntax and rulesets and Publish the project to Exchange.

EXAMPLES
  Validates the syntax and the rulesets defined in the API Project case that the validation passes, the project will
  be Published to Exchange.

    $ anypoint-cli-api-project-plugin api-project publish --l=./projectPath

  Validates the syntax and the rulesets defined in the API Project case that the validations doesn't pass, can skip
  them adding the skip-validation flag,so that the project will be published anyway.

    $ anypoint-cli-api-project-plugin api-project publish --l=./projectPath --skip-validation=rulesets

  Publish the project with another name or in another organization.

    $ anypoint-cli-api-project-plugin api-project publish --l=./projectPath \
      --group-id=c8531dch-471c-479z-87ce-b3886d05b8ad --asset-id=assetName --asset-version=2.3.0

anypoint-cli-api-project-plugin api-project validate

Validate an API Project definition

USAGE
  $ anypoint-cli-api-project-plugin api-project validate [--password <value> [--username <value> | --client_id <value> |
    ]] [--client_secret <value> ] [--bearer <value> |  | ] [--organization <value>] [--environment <value>] [--host
    <value>] [--collectMetrics] [--local-ruleset <value>] [--ruleset <value>] [-l <value>] [-c] [--json]
    [--custom-raml-tag <value>]

FLAGS
  -c, --centralized-rulesets    Validates against centralized rulesets (API Governance Profiles)
  -l, --location=<value>        [default: ./] Path to the API Project directory to validate
  --bearer=<value>              Token Bearer. You can define this in the ANYPOINT_BEARER environment variable.
  --client_id=<value>           Client ID. You can define this in the ANYPOINT_CLIENT_ID environment variable.
  --client_secret=<value>       Client Secret. You can define this in the ANYPOINT_CLIENT_SECRET environment variable.
  --collectMetrics              collect metrics. You can define this in the COLLECT_METRICS environment variable.
  --custom-raml-tag=<value>     Name of the custom tag defined in the Raml Api Spec, to get custom tags values
  --environment=<value>         Environment Name. You can define this in the ANYPOINT_ENV environment variable.
  --host=anypoint.mulesoft.com  [default: anypoint.mulesoft.com] Host URL. You can define this in the ANYPOINT_HOST
                                environment variable.
  --json                        Format the default standard output to JSON
  --local-ruleset=<value>...    [default: ] Ruleset path to files to add to validation
  --organization=<value>        Organization Name. You can define this in the ANYPOINT_ORG environment variable.
  --password=<value>            Password. You can define this in the ANYPOINT_PASSWORD environment variable.
  --ruleset=<value>...          [default: ] Remote Ruleset groupid/assetid/version (GAV) to add to validation
  --username=<value>            Username. You can define this in the ANYPOINT_USERNAME environment variable.

DESCRIPTION
  Validate an API Project definition

EXAMPLES
  Validates the syntax and the governance rulesets in the project passed in the flag location, the rulesets have to be
  defined in the dependencies property in exchange.json file.

    $ anypoint-cli-api-project-plugin api-project validate --l=./projectPath

  Validates the syntax and the governance rulesets in the project passed in the flag locationAlso in this case the CLI
  download the ruleset specified in the ruleset flag with the asset identifier.
  An asset identifier is a group ID, asset ID, and version (GAV) that uniquely identifies each asset in Exchange.

    $ anypoint-cli-api-project-plugin api-project validate --l=./projectPath --ruleset \
      68ef9520-24e9-4cf2-b2f5-620025690913/anypoint-best-practices/1.0.0

  Validates the syntax and the governance rulesets in the project passed in the flag locationAlso in this case the CLI
  applies the ruleset located in the directory specified in the local-ruleset flag.

    $ anypoint-cli-api-project-plugin api-project validate --location=./projectPath --local-ruleset \
      ~/mule/examples/demo/rulesets/

  Validates the syntax and the governance rulesets in the project passed in the flag locationAlso in this case the CLI
  download and apply the rulesets that matches in the API Governance Profiles with the project to validate.

    $ anypoint-cli-api-project-plugin api-project validate --l=./projectPath --centralized-rulesets

anypoint-cli-api-project-plugin conf [KEY] [VALUE]

Manage authentication credentials in a configuration file (config.json)

USAGE
  $ anypoint-cli-api-project-plugin conf [KEY] [VALUE] [-h] [-k <value>] [-v <value>] [-d]

ARGUMENTS
  KEY    key of the config
  VALUE  value of the config

FLAGS
  -d, --delete         delete config key
  -h, --help           Show CLI help.
  -k, --key=<value>    key of the config
  -v, --value=<value>  value of the config

DESCRIPTION
  Manage authentication credentials in a configuration file (config.json)
  by adding and removing key value pairs. Set one key value pair per command execution.
  CLI config file: ~/Library/Preferences/anypoint-cli-v4-nodejs/config.json

EXAMPLES
  $ anypoint-cli-api-project-plugin conf username myuser

  $ anypoint-cli-api-project-plugin conf password mypwd

anypoint-cli-api-project-plugin help [COMMAND]

Display help for anypoint-cli-api-project-plugin.

USAGE
  $ anypoint-cli-api-project-plugin help [COMMAND] [-n]

ARGUMENTS
  COMMAND  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for anypoint-cli-api-project-plugin.

See code: @oclif/plugin-help

anypoint-cli-api-project-plugin version

USAGE
  $ anypoint-cli-api-project-plugin version

See code: @oclif/plugin-version