New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

sparkflare

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sparkflare

CLI to interact with Cloudflare and improve the DX for cloudflare pages

latest
npmnpm
Version
0.0.4
Version published
Weekly downloads
5
Maintainers
0
Weekly downloads
 
Created
Source

Sparkflare CLI

Sparkflare CLI is a command-line interface for manage your Cloudflare Pages projects.

Installation

npm install -g sparkflare

Usage

Initialize

To initialize the CLI, run the following command:

sparkflare init

This command will ask you for your Cloudflare API token, the account ID, the project name, and which package manager you are using. You can also don't provide the values and set them later in the .config.vars file.

[!TIP] You can read the Cloudflare API documentation to learn how to get your API token and account ID.

Pull Environment Variables

To pull environment variables from Cloudflare Pages, run the following command:

sparkflare environment:pull

This will pull the environment variables from the selected environment and save them locally, after pulling the environment variables, you can use the sparkflare environment:switch command to select the environment you want to use.

Switch Environment

To switch between environments, run the following command:

sparkflare environment:switch

This will prompt you to select an environment from the list of environments you have set up.

Deploy

To deploy your project, run the following command:

sparkflare deploy

This command will build your project and deploy it to Cloudflare Pages.

Flags and Environment Variables

Global

FlagVariableDescriptionUsed on
-y, --yesSPARKFLARE_SKIP_CONFIRMATIONIf present or true, indicates to skip all user confirmationsinit, deploy
-t, --tokenSPARKFLARE_CLOUDFLARE_TOKENIf present, prefer the specified token instead of the one in the configinit, deploy, environment:pull
-a, --account-identifierSPARKFLARE_CLOUDFLARE_ACCOUNT_IDENTIFIERIf present, prefer the specified account ID instead of the one in the configinit, deploy, environment:pull
-n, --project-nameSPARKFLARE_CLOUDFLARE_PROJECT_NAMEIf present, prefer the specified project name instead of the one in the configinit, deploy, environment:pull
-p, --package-managerSPARKFLARE_PACKAGE_MANAGERIf present, prefer the specified package manager instead of the one in the configinit, deploy

Subcommand

init

FlagVariableDescription
-f, --forceSPARKFLARE_FORCE_INITIf present, it will override the .config.vars file

deploy

FlagVariableDescription
-e, --environmentSPARKFLARE_ENVIRONMENTIf present, it will switch and deploy to the specified environment with this flag/env. Possible values: preview, production. Requires environment:pull

environment:switch

FlagVariableDescription
-e, --environmentSPARKFLARE_ENVIRONMENTIf present, prefer the specified environment instead of the one in the config. Possible values: local, preview, production

FAQs

Package last updated on 03 Sep 2024

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