Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

dcloud

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dcloud

DEITY Falcon Cloud CLI tool

npmnpm
Version
0.21.0
Version published
Weekly downloads
29
38.1%
Maintainers
1
Weekly downloads
 
Created
Source

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.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

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 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>

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

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 john@example.com "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

FAQs

Package last updated on 02 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts