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

dcloud

v0.28.1

Published

DEITY Falcon Cloud CLI tool

Downloads

47

Readme

DEITY Falcon Cloud CLI tool

dcloud is a tool to control, monitor and trigger your deployments to DEITY Falcon Cloud.

In order to use it, install it globally with:

npm i -g dcloud

Changelog

0.28.1

  • fixed issues with redirects uploading

0.28.0

  • added possibility to enable/disable SEO indexing for particular environment details here
  • added possibility to enable/disable maintenance mode of environments details here
  • added possibility to display logs as list details here

0.27.0

  • added possibility to add/remove webhooks that will be called after deployment details here

0.26.0

  • added possibility to configure access to environments only for users who have DeityCloud account details here

  • added possibility to configure access to environments only for predefined IP addresses details here

0.25.0

  • added possibility to configure branches which will be build automatically details here

0.24.0

  • adjusted all dependencies to work with the newest node.js versions

0.23.0

  • added possiblity to run build for particular commit details here

0.22.0

  • changed authentication to use the new configuration

0.21.0

  • added possibility to select user role when sending invitation details here

0.20.2

  • Fixed issue during rendering logs when using log:watch command

0.20.1

  • Improved messaging of domain verification process

0.20.0

  • Added wizard for domain creation and SSL certificate validation details here
  • Added --module option to search logs module field details here

0.19.1

  • fixed issue with loading environment variables from file

0.19.0

  • Added --data-file, -d flag that gives the possibility to load the value of environment variable from a file so it doesn't stay in the bash history details here
  • Added --base64, -e flag that encodes the value of passed environment variable as base64 before sending to the api details here
  • Added --from-file, -f flag that gives the possibility to set multiple environment variables at once (by loading them from specified file) details here

0.18.1

  • Fixed issues with table rendering during log streaming

0.18.0

  • Added support for external domains details here
  • Added information about outdated builds

0.17.1

  • Improved handling of currency configuration for DPSG
  • Fixed warning about missing dependencies

0.17.0

  • Added payments:customer-map:add command for adding mappings between shop customer and psp customer details here

0.16.1

  • Fixed issues with displaying special characters in tables

0.16.0

  • Added --path option to purge cdn domain - details here
  • Added command dcloud env:cache:flush <env> that flushes the environment cache - details here

0.15.1

  • The command dcloud project:current:set can now be executed without the organization and project flag. When doing so, you can select the project using an interactive prompt.

0.15.0

  • Added command to delete a payment profile
  • Added command to update a payment profile
  • Renamed payments:env commands to payments:profile.
  • Removed the payments:region commands. This functionality is replaced by region prompts on most payments commands.
  • Added command to auto-generate/sync the payments profiles to the project environment payments:profile:sync.
  • Added command to update a payment method

0.14.0

  • added optional --phrase parameter to filter logs by passed search phrase.

0.13.3

  • Added automatic redirect to the login page if authentication is no longer valid
  • Added information about environment location to dcloud env command
  • Improved display of environment details

0.13.2

  • Fixed an issue that presented the countries list when configuring the currencies of a payment provider.
  • Restricted the input for Merchant's store country when configuring the Humm payment provider.

0.13.1

  • Added commands to set/get the DPSG region - details here
  • Added ability to set minimum and maximum amounts when configuring payment methods - details here
  • Fixed issue with user:invite command

0.12.1

  • Fixed an issue (typo) in the applyToken (DPSG) command, that resulted in environment variables not being set properly for that command

0.12.0

  • Added "environment apply" command for DPSG, to configure the DPSG environment variables on the Deity Cloud Environment - details here

0.11.0

0.10.0

  • Added logs filtering (by application name) - details here
  • Added logs stream filtering (by application name) - details here
  • Added CDN purge command - details here
  • Added CDN purge status progress command - details here
  • Added upload CSV file with redirects command - details here
  • Added delete all redirects command - details here
  • Updated internal dependencies to improve security
  • Added possibility to select version of FalconPlatform for particular environment - details here

0.9.0

  • Added logs filtering (by date range, and severity) - details here
  • Added log output formatting - it's now possible to print log entries as JSON - details here
  • Added possibility to fetch single log item by its id - details here

Available commands:

Build List

List your current builds.

dcloud build:list

Options

  • -l <limit> Limit the results
  • -p <page> Which page of results to show

Example: show 30 results

dcloud build:list -l 30

Build Info

Get information on a build.

dcloud build [id]

Options

  • -w Watch a build (if it's not finished)
  • -o Show build output to the console

Example: Watch the build with id 20

dcloud build 20 -w

Configure branch to be built automatically

By default DeityCloud service runs builds for every single push to the repository. You can change that behavior (to avoid cluttering the build list with unnecessary builds and use less storage) so builds are triggered only for the particular branches (you will still be able to create a build from particular branch or commit).

In order to configure a branch to be built automatically use the following command:

dcloud build:branch:add [branch-name]

Options

N/A


Configure a branch to not be built automatically

Remove branch name from the list of automatically built branches after code push

dcloud build:branch:remove [branch-name]

Options

N/A


List branches that will be built automatically

List all branch names that will be built automatically after code push

dcloud build:branch:list

Options

N/A


Build from commit

Run a new build for particular commit. As parameter you can pass any value that can be passed to git checkout command in your repository

dcloud build:commit [commit-sha|branch-name|tag-name]

Example: Run build for commit 0d88dccc

dcloud build:commit 0d88dccc

Example: Run build for main branch

dcloud build:commit main

Example: Run build for v1.0 tag

dcloud build:commit v1.0

Deployment List

List your deployments

dcloud deployment:list

Options

  • -l <limit> Limit the results
  • -p <page> Which page of results to show

Deployment Info

Get information on a deployment.

dcloud deployment [id]

Options

  • -w Watch a deployment (if it's not finished)
  • -o Show deployment output to the console

Deploy

Deploy a build

dcloud deployment:run [buildId] [environmentName]

Options

  • -y Auto-confirm the deployment process. Useful if you're not deploying manually.

Example: Deploy build 20 to the development environment

dcloud deployment:run 20 development

Environments List

List all available environments

dcloud env:list

Options

N/A


Environment maintenance mode

Maintenance mode allows you to present a "we're under maintenance" view and do not pass any requests to the application. This allows to perform maintenance of 3rd party systems without disruption from the PWA/Middleware users.

When maintenance mode is enabled all the request are routed to the maintenance.html view which should be placed in public folder of your frontend application.

Enable maintenance mode of environment

dcloud env:maintenance:enable [env]

Options

N/A

Disable maintenance mode of environment

dcloud env:maintenance:disable [env]

Options

N/A

NOTE: to be sure that the values are correctly read from your terminal surround variable-value with double quotes, for example:

Environment Info

Get info on a specific environment

dcloud env <env>

Options

N/A


Environment Deployments

Get deployments for an environment

dcloud env:deployments <env>

Options

  • -l <limit> Limit the results
  • -p <page> Which page of results to show

Environment Variable

Set a variable on an environment (this doesn't send the variable to the application immediately. In order to do so you have to either run a deployment or apply saved variables)

dcloud env:var:set <env> <name> [value]

Options

  • -s, --secret marks variable as secret - it's full value cannot be read (will be masked when displaying)
  • -d, --data-file <filePath> Path to the file containing environment variable value
  • -e, --base64 Encode the variable value as base64 string before sending it
  • -f, --from-file <filePath> Set multiple environment variables from a file with one command (see information about file format below)

NOTE: to be sure that the values are correctly read from your terminal surround variable-value with double quotes, for example:

dcloud project:var:set BUILD_TOKEN "abcdefg123"

Format of the file passed to -f (--from-file) option is the following:

FOO=variable value
# comment - will be ignored
BAR=126
BAZ=full string will be taken as value

NOTE: Everything after first = sign will be passed as variable value - including whitespaces, quotes etc. It means that if you put a string in quotes then these quotes will be included as value (which usually is not intended).


Apply environment variables

Applies previously set environment variables to the actual environment. Once applied the application in that environment will be restarted and after restart will have access to the applied environment variables.

dcloud env:var:apply <env>

Options

N/A


Environment Set Domain

Assign a domain to an environment

dcloud env:domain:assign <env> [domainName]

Options

N/A


View Environment domain configuration

Get the configuration of the domain assigned to the environment

dcloud env:domain <env>

Options

N/A


Environment Un-assign Domain

Un-assign a domain from an environment

dcloud env:domain:unassign <env> [domainName]

Options

N/A


Environment upload redirects CSV file

Upload redirects rules

dcloud env:redirects:upload <env> <absolute path to file>

CSV File format example:

old_url,new_url
old_url2,new_url2
old_url3,new_url3

Options

N/A


Environment delete redirects

Delete redirects

dcloud env:redirects:delete <env>

Options

N/A


Environment flush cache

Flush environment cache

dcloud env:cache:flush <env>

Options

N/A


Available FalconPlatform versions

List available FalconPlatform versions

dcloud env:platform-version:list

Set FalconPlatform version

Change FalconPlatform version for environment (deploy FalconServer in selected version to selected environment)

dcloud env:platform-version:set <env> <version>

Environment access configuration

You can set up environment to be avaialble only for people who have DeityCloud account. That way nobody from outside your team will not be able to see the environment. The access is configurable per environment - you can specify which accounts can see partiular environment.

Enable environment authorization

Note: after this action is performed you need to call env:var:apply command to synchronize the environment.

dcloud env:auth:enable <environment>

Disable environment authorization

Note: after this action is performed you need to call env:var:apply command to synchronize the environment.

dcloud env:auth:disable <environment>

List authorized users for environment

dcloud env:auth:list <environment>

Allow user to view the environment

dcloud env:auth:add <environment> <email>

Disallow user to view the environment

dcloud env:auth:remove <environment> <email>

Environment IP access configuration

You can set up environment to be avaialble only when viewer IP is on allowed to view it. The IP access is configurable per environment - you can specify which IPs can see partiular environment.

Enable environment IP lock

Note: after this action is performed you need to call env:var:apply command to synchronize the environment.

dcloud env:ip:allowlist:enable <environment>

Disable environment IP lock

Note: after this action is performed you need to call env:var:apply command to synchronize the environment.

dcloud env:ip:allowlist:disable <environment>

List allowed IPs for environment

dcloud env:ip:allowlist:list <environment>

Allow IP to allowlist for the environment

dcloud env:ip:allowlist:add <environment> <IP> <name>

The name parameter is optional - it's used as label for IP so it's easy to identify it

Remove IP from allow list for the environment

dcloud env:ip:allowlist:remove <environment> <IP>

Webhooks configuration

NOTE: Currently, webhooks will be called when deployment to particular environment finishes with sucessfull status.

Add webhook to environment

dcloud env:webhooks:add <env> <name> <url>
  • name is a unique name of webhook so you can identify its purpose
  • url is full url that should be called

Example:

dcloud env:webhooks:add production run-tests https://my-test-service/run-tests

List environment webhooks

dcloud env:webhooks:list <env>

Remove environment webhook

In order to remove webhook call the command below and you'll be presented with list of webhooks that you can select to be removed.

dcloud env:webhooks:remove <env>

SEO Indexing

By default each environment has indexing enabled. You can however block the indexing robots by toggling this feature and DeityCloud infrastructure will override robots.txt file in your project with the one with the following content:

User-agent: *
Disallow: /

Enable SEO indexing (user project's original robots.txt)

dcloud env:indexing:enable <env>

Disable SEO indexing (override robots.txt)

dcloud env:indexing:disable <env>

NOTE: robots.txt file by default is cached for 15 minutes by CDN so make sure to wait 15 minutes after configuration changes.

List domains

List all the domains created in the project

dcloud domain:list

Create domain

Creates domain (managed by DeityCloud infrastructure or externally) and its configuration but doesn't apply it to an environment, so the domain is not used yet.

You can create many domains in the scope of the project and then assign particular domain to particular environment.

dcloud domain:create <domain>

Options

  • --external marks domain as external - if you manage the domain by yourself (e.g. on your CloudFlare account then use this flag)
dcloud domain:create --external my-custom-domain.com

Remove domain

Removes the domain from project. Please note that the domain must not be assigned to any environment in order to remove it.

dcloud domain:remove <domain>

Options

N/A


Domain Purge CDN cache

Purge CDN cache for a domain

dcloud domain:purge-cdn-cache <domain>

Options

  • -p, --path <path> Purges at CDN the particular path at your domain: example.com/YOUR_PATH
dcloud domain:purge-cdn-cache example.io -p robot.txt

Domain Purge CDN status progress

Get status of purge CDN process for a domain

dcloud domain:purge-cdn-status <purgeID>

Options

N/A

Domain and SSL certificate validation

After cration of a domain under your project you need to validate its ownership in order to be able to assign the domain to an environment and create SSL certificate for it.

To start the vadliation run:

dcloud domain:validate <domain>

Options

N/A

The process will guide you through the validation of both domain ownership and SSL certificate. Once these steps are done you'll be able to assing the domain to your environment.


View environment logs

Get the list of latest logs per environment

dcloud log:list [options] [environment]

Options

  • -l <limit> Limit the results

  • -p <page> Which page of results to show

  • --from <date> Date from (see below)

  • --to <date> Date to (see below)

  • --span <span> Date span (see below)

  • -–severity <severity> Log item severity, (you join them with comma to use multiple at once). Available values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL

  • -–app <value> Log item application name, (you join them with comma to use multiple at once). Available values: nginx, FalconServer, FalconClient

  • -–phrase <value> Log item filtered by passed search phrase.

  • -–module <value> Log item filtered by passed module.

  • -o, --output <format> Output format of the logs, by default it uses table so the logs are printed in the formatted table but you can also use:

    • json or json-formatted to get the items in JSON format
    • list to get the items as plantext list

Date formats

You can use one of the following:

  • ISO date format, e.g. 2021-02-01T11:31:17.003Z

  • YYYY/MM/DD or YYYY-MM-DD, e.g. 2021/02/01 or 2021/02/01

  • YYYY/MM/DD HH:MM:SS(Z) e.g. 2021/02/01 11:31:17 or 2021/02/01 11:31:17Z

Date span options

Date span option allows you to get log items from particular time span. You can combine that also with --from or --to to get the logs from exact time you're interested in

Available span markers:

  • d - days

  • h - hours

  • m - minutes

  • s - seconds

Examples:

  • get logs from last 5 minutes: --span=5m

  • get logs from 3 minutes before 2021/02/01 10:05:00 (up to 2021/02/01 10:05:00): --to='2021/02/01 10:05:00' --span=3m

  • get logs from 2021/02/01 10:05:00 to 2 minutes after that time: --from='2021/02/01 10:05:00' --span=2m


Get log entry by id

Get log entry by its id

dcloud log:item [environment] [itemId]

Options

  • -o, --output <format> Output format of the logs, by default it uses table so the logs are printed in the formatted table but you can also use json or json-formatted to get the items in JSON format

Stream the latest logs for an environment

Get the log output for given environment

dcloud log:watch [environment]

Options

  • -–severity <severity> Log item severity, (you join them with comma to use multiple at once). Available values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL

  • -–app <value> Log item application name, (you join them with comma to use multiple at once). Available values: nginx, FalconServer, FalconClient

  • -–phrase <value> Log item filtered by passed search phrase.


Repositories List

Get a list of your current/active repositories

dcloud repo

Options

  • -i Show setup instructions for each repository

Project Info

Get your project information

dcloud project <name>

Options

N/A


Projects List

Get a list of your projects

dcloud project:list

Options

  • -l <limit> Limit the results
  • -p <page> Which page of results to show

Project Current

Get the current project

dcloud project:current

Options

N/A


Project Set Current

Set a project as current

dcloud project:current:set [organization] [projectName]

Options

N/A


Project Build Variables List

List your variables

dcloud project:var:list

Options

N/A

NOTE: variables listed here for security reasons are masked and you cannot read the exact value


Set Project Build Variable

List your variables

dcloud project:var:set <variable-name> <variable-value>

Options

N/A

NOTE: to be sure that the values are correctly read from your terminal surround variable-value with double quotes, for example:

dcloud project:var:set BUILD_TOKEN "abcdefg123"

Login

WARNING: This is deprecated, please use Login with Token to log in. Existing users will be prompted to migrate to using a token for logging in.

Logs into DEITY Falcon Cloud using credentials. If credentials aren't passed you will be prompted to add them.

dcloud login [email] [password]

Options

N/A


Logout

Logs the current user out

dcloud logout

Options

N/A


Who am I

Get the current logged in user

dcloud whoami

Options

N/A

Invite user to the organization

Create and send invitation

dcloud user:invite <email> <name>

Running this command will show you picker that gives the possibility to select a role which invited user will get assigned

Example: show 30 results

dcloud user:invite [email protected] "John Smith"

Options

N/A

DPSG

List of all available Payment Providers

dcloud payments:provider:list:all

List of all available Payment Methods (per provider)

dcloud payments:method:list:all

List configured Payment Providers per environment

dcloud payments:provider:list

List configured Payment Methods per environment

dcloud payments:method:list

Configure Payment Provider (wizard)

dcloud payments:provider:configure

Configure Payment Method (wizard)

dcloud payments:method:configure

Automatically creates matching payments profiles for the project's environments

dcloud payments:profile:sync

Create a payment profile

dcloud payments:profile:create

Update a payment profile

dcloud payments:profile:update

Delete a payment profile

dcloud payments:profile:delete

Get environment info (including tokens)

dcloud payments:profile:info

Add customer mapping (Shop Customer ID to PSP Customer ID)

dcloud payments:customer-map:add --organization <my-org> --project <my-project> --environment <my-env> --provider <provider-name> --region <dpsg-region> <shopCustomerId> <pspCustomerId>

or to use a step-by-step wizard - run:

dcloud payments:customer-map:add