Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@hubspot/local-cms-server-cli
Advanced tools
Command line tools for running and using the Local CMS Server
yarn add @hubspot/local-cms-server-cli
yarn hs-cms-server init
yarn hs-cms-server start
NOTE: if this is your first starting the server, it may take a minute to pull down the docker image. Once you see the line "Local HubL Server started, running at http://0.0.0.0:8080/" printed to the console, navigate to that URL in your browser
yarn add @hubspot/local-cms-server-cli
yarn hs-cms-server init --config --context
# (For now) manually update cli-config.yaml and server-config.yaml with appropriate values
# configs explained later on in this README
yarn hs-cms-server start
Your project should have two directories: context
and designs
(These names can be configured to whatever you'd like, more on that later)
context
- This directory contains HubSpot entities, as well as some default stylesheets to be rendered with your templates. e.g., your context
directory could have a hubdb/<portalId>
directory. In your templates, you will be able to use HubL tags and functions that reference these HubDB tables.designs
- This directory will contain all your HubL templates, stylesheets, js, custom modules in whatever organization you'd like. It is meant to mimic the structure of your project within the design manager UI.Pulls down the latest docker image of the local cms server (unless you already have it locally), checks the current directory for server-config.yaml
and then starts the server on `http://0.0.0.0:8080.
This will bring you to an index page with three sections:
context/content/<portalId>/
) with their specified template. If your template references content variables, those will be renderedcontext/blogs/<portalId>/
) with their specified template.--config
flag initializes a cli-config.yaml
and server-config.yaml
--context
flag initializes a `context directory. This includes default hubspot stylesheets, some generic objects to be rendered with your templates (e.g. site-settings.json), as well as some example objects that will be rendered with portal 123--designs
flag initializes a designs
directory with some example templates, that reference some of portal 123's data in the context
directory--all
will initialize all of the above. You can also omit a flag all together for the same effectThis command is used to run gulp tasks for downloading data from your portal to your project. It uses the configs specified in cli-config.yaml
The --tasks
flag lists the valid tasks you can run, which are:
download-all
- Runs all the download-*
tasksdownload-blogs
- Downloads blog listing page objects, which allows you to render your templates with blog contextdownload-content
- Downloads page content, which allows you to render your templates with page contextdownload-default-modules
- Downloads the default modules for your portal, in a .module
directory structure. e.g. Rich Text moduledownload-designs
- Uses FTP to download your designs directorydownload-hubdb
- Downloads your hubdb tables/rowsdownload-layouts
- Downloads drag and drop layout objects, to locally render pages built in the DnD editordownload-menus
- Downloads navigation menusdownload-resource-mappings
- Downloads a mapping file of resource ID -> file location in the design manager. This is needed for HubL functions that reference resources by their ID.context
dirdesigns
dirYou shouldn't need to worry about the other properties in that file
This config is used for the run-tasks
command described above. Here you can specify your hapikey
(for connecting to HubSpot APIs) and your contextDirPath
for where you want these local entities to be stored. This should match the contextBaseDir
in server-config.yaml
. Your hapikey can be found here: https://app.hubspot.com/l/integrations-settings/api-key
download-designs
asks for your FTP username/password, portalId, and the local output dir.limit
is a property for most tasks. The hubspot APIs default limit the response to 100 objects. You can change this number by specifying the limit
for the entity you are downloading.FAQs
CLI tools to be paired with @hubspot/local-cms-server
The npm package @hubspot/local-cms-server-cli receives a total of 17 weekly downloads. As such, @hubspot/local-cms-server-cli popularity was classified as not popular.
We found that @hubspot/local-cms-server-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.