Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
dxpcloud-cli
Advanced tools
Command line tool for Liferay DXP Cloud
curl https://cdn.liferay.cloud/lcp/stable/latest/install.sh -fsSL | bash
Download the Windows installer from https://cdn.liferay.cloud/lcp/stable/latest/lcp-install.exe
. Run the installer and follow the steps in the wizard.
Usage: lcp <cmd> [args]
Commands:
lcp deploy Deploy to DXP Cloud
lcp docs Open the documentation of DXP Cloud in your browser
lcp list Show list of projects and services
lcp log Show logs of project, service or instance
lcp login Login to DXP Cloud
lcp logout Logout from DXP Cloud
lcp remote Configure DXP Cloud remotes
lcp restart Restart a DXP Cloud service
lcp scale Change the number of service instances
lcp shell Open a shell to a service
lcp update Update DXP Cloud CLI
lcp version Show CLI version
Options:
-v, --verbose Show more information about an operation [boolean]
--version Show version number [boolean]
--help Show help [boolean]
$ npm i
$ ./bin/index.js <cmd> [args]
$ npm run test
Build executable files by running npm run release
. This will create binary files in dist
folder.
Preparing to push to the CDN
Execute node .update_cdn.js update
. The following arguments are supported:
$ node .update_cdn.js update --help
.update_cdn.js update
Updates given channel with a new CLI version
Options:
--version Show version number [boolean]
--help Show help [boolean]
--channel The channel to update [string] [choices: "stable", "unstable"] [default: "stable"]
--cdn CDN sources [string] [default: "../cdn/cli"]
--cli-version The CLI version to publish [string] [default: "latest"]
--package-version The package version to specify [string] [default: "1.0.0"]
Note: package-version
value is read automatically from version
property in package.json
. It is not hardcoded.
This will update the CDN project with the new binary files. Then, deploy a new version of the CDN project.
Build installers by executing node .make_installer.js make
. The following arguments are supported:
$ node .make_installer.js make --help
.make_installer.js make
Generates an installer for the CLI
Options:
--version Show version number [boolean]
--help Show help [boolean]
--platform The target operating system [string] [choices: "unix", "windows"] [default: "unix"]
--channel The channel to target [string] [choices: "stable", "unstable"] [default: "stable"]
--cli-version The CLI version to target [string] [choices: "latest"] [default: "latest"]
--make-uninstaller Whether to make the Windows uninstaller-generator binary [boolean] [default: false]
--unsigned Generate the installer without signing [boolean] [default: false]
This will generate an installer at /installers/< --platform >/dist/
using the current configuration found in /config/app.config.js
and /config/installer.config.js
.
Run the following command:
node ./.make_installer.js make --platform unix
Then, retrieve the install.sh
script from /installer/unix/dist/
.
Run the following command:
node ./.make_installer.js make --platform unix
Then, retrieve the uninstall.sh
script from /installer/unix/dist/
.
The Windows installer and uninstaller cannot be differentiated since the uninstaller is packaged in the installer. In other words, the installer delivers the uninstaller binary into the install location upon installation. So, in order for the Windows installer binary to be properly created, the uninstaller must be pre-generated and then inserted into the resources
directory so that it can be packaged into the installer binary. This flow is necessary in the particular case that the code must be signed, since the uninstaller would not be signed if it were merely generated by the installer upon installation.
The uninstaller binary is pre-generated using an "uninstaller-generator" EXE file, which is actually a blank installer which writes the uninstaller binary when it's run. This allows the developer to insert the newly created uninstaller into the resources
directory, where it can be packaged into the installer binary.
To create the uninstaller-generator file, the --make-uninstaller
parameter must be set to true
when running the .make_installer.js
script. The uninstaller-generator file must then be executed on a Windows machine or VM not in a network drive in order to properly generate the uninstaller binary. The new uninstaller binary must then be placed in the resources
directory. This is where it will be found by the NSIS compiler when running the lcp-cli-makeinstall
script, which packages the uninstaller into the final installer binary. The lcp-cli-makeinstall
script is executed by running .make_installer.js
with --platform windows
. The resulting Windows installer can then be found in the dist
directory.
So, the steps for releasing a signed Windows installer are:
.make_installer.js
with --platform windows
and --make-uninstaller true
to generate a win-uninstaller-generator.exe
file.node ./.make_installer.js make --platform windows --make-uninstaller true
win-uninstaller-generator.exe
. If done correctly, a new uninstaller binary will be created. Make sure to run win-uninstaller-generator.exe
in a non-network drive for it to work properly.resources
directory on your host machine..make_installer.js
with --platform windows
to output the final, signed Windows installer in the dist
directory.node ./.make_installer.js make --platform windows
If you do not have access to the code signing certificate or wish to generate an unsigned Windows installer, run the following command:
node ./.make_installer.js make --platform windows --unsigned true
Note: Code signing can only be performed on MacOS and Linux machines at this time.
Note: Because the config files will be used to configure the installer, it is good to understand the relevant config variables that will be primarily used. They are listed below. These variables can be overridden in /config/installer.config.js
.
package.json
, provides the version of the CLI to Windowscurl https://cdn.liferay.cloud/lcp/stable/latest/uninstall.sh -fsSL | bash
Navigate to Control Panel -> Add or Remove Programs
. Find "LCP CLI" in the list of programs, select it, and click "Uninstall". Follow the steps in the wizard.
BSD-3-Clause, © Liferay, Inc.
FAQs
CLI for Liferay DXP Cloud
The npm package dxpcloud-cli receives a total of 1 weekly downloads. As such, dxpcloud-cli popularity was classified as not popular.
We found that dxpcloud-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.