@digital-dood/spacer-management
v0.26.51
Published
CLI for spacer management
Downloads
23
Readme
Installation
# Run command to install the spacer-management cli globally
yarn global add @digital-dood/spacer-management
Development
# After development please cheange package.json version and publish new tag to npm packages following command using digital-dood credentials
yarn publish --tag
Commands
# Install command:
# 1. download project archive from the priovided URL parameter
# 2. extract archive in the provided location PATH
spacer-management install URL NAME PATH
example: spacer-management install http://mysite.com/project-v1.zip project1 /path
# validate command:
# This command will check the necessary files before the build command
spacer-management validate PROJECT_PATH
example: spacer-management validate project1/repo/administration-app
# build command:
# This command will build the project with yarn scripts
spacer-management build payload
example: spacer-management build payload
payload ex:
{
"projectVersionPath":"project1/repo/administration-app",
"userId":"1",
"applicationId": "1"
"token":"TOKEN",
"xsrf":"XSRF",
"env":{
"DEVLINK":"LINK",
"testLink":"LINK"
}
}
# clone project command:
# This command will clone the project
example: spacer-management clone payload
payload ex:
{
"url": "[email protected]:digital-dood/administration-app.git",
"name": "admin",
"path": "projects",
"description": "front-end app",
"type": "0",
"token":"TOKEN",
"xsrf":"XSRF"
}
# Activate command
# 1. get the nginx TEMPLATE ('node' or 'react' are available)
# 2. host file for nginx will be created based on the provided HOSTNAME
# 3. update nginx host to point for your application and start the apllication
spacer-management activate TEMPLATE PATH HOSTNAME
example: spacer-management activate node project1 project1.com
# validate command:
# This command will generate ssh
spacer-management generate-ssh payload
example: spacer-management generate-ssh
payload ex:
{
"token": TOKEN,
"xsrf": XSRF
}
# activate version command:
# This command will activate a version of the project
spacer-management activate-version payload
example: spacer-management activate-version payload
payload ex:
{
"name": "NAME FROM CONFIG",
"type": "react",
"host": "${NAME}.spacer-dev.dood-dev.com",
"versionId": "VERSIONID",
"token": "TOKEN",
"xsrf": "XSRF",
"version": "VERSION FROM CONFIG"
}
# Delete application command:
# This command will delete the application with all the belongings
spacer-management delete payload
payload ex:
{
"type":"react",
"name":"NAME",
"host":"HOST",
"token":"TOKEN",
"xsrf":"XSRF",
"id":"APPID",
"fileId":"[{1},{2}]"
}
# NOTE! for step 3 with 'node' application template this will start a new PM2 process on an available random port
# Delete application version command:
# This command will delete the application version only if it is not active with all the belongings
spacer-management delete-version payload
payload ex:
{
"name":"NAME",
"host":"HOST",
"token":"TOKEN",
"xsrf":"XSRF",
"id":"versionId",
"version":"V1"
}
# NOTE! for step 3 with 'node' application template this will start a new PM2 process on an available random port