🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@subql/cli

Package Overview
Dependencies
Maintainers
2
Versions
469
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@subql/cli

cli for subquery

Source
npmnpm
Version
2.1.0
Version published
Maintainers
2
Created
Source

@subql/cli

CLI for SubQuery

oclif Version Downloads/week License

Usage

$ npm install -g @subql/cli
$ subql COMMAND
running command...
$ subql (-v|--version|version)
@subql/cli/2.1.0 linux-x64 node-v16.20.0
$ subql --help [COMMAND]
USAGE
  $ subql COMMAND
...

Commands

subql build

Build this SubQuery project code

USAGE
  $ subql build

OPTIONS
  -f, --location=location                   local folder
  -o, --output=output                       output folder of build e.g. dist
  -s, --slient                              silent mode
  --mode=(production|prod|development|dev)  [default: production]

See code: lib/commands/build.js

subql codegen

Generate schemas for graph node

USAGE
  $ subql codegen

OPTIONS
  -f, --file=file          specify manifest file path (will overwrite -l if both used)
  -l, --location=location  [deprecated] local folder to run codegen in. please use file flag instead

See code: lib/commands/codegen.js

subql deployment

Deploy to hosted service

USAGE
  $ subql deployment

OPTIONS
  -d, --useDefaults                        Use default values for indexerVersion, queryVersion, dictionary, endpoint
  --deploymentID=deploymentID              Enter deployment ID
  --dict=dict                              Enter dictionary
  --disableHistorical                      Disable Historical Data
  --endpoint=endpoint                      Enter endpoint
  --indexerBatchSize=indexerBatchSize      Enter batchSize from 1 to 30
  --indexerSubscription                    Enable Indexer subscription
  --indexerUnsafe                          Enable indexer unsafe
  --indexerVersion=indexerVersion          Enter indexer-version
  --indexerWorkers=indexerWorkers          Enter worker threads from 1 to 30
  --ipfsCID=ipfsCID                        Enter IPFS CID
  --options=deploy|promote|delete
  --org=org                                Enter organization name
  --projectName=projectName                Enter project name
  --project_name=project_name              Enter project name
  --queryAggregate                         Enable Aggregate
  --queryMaxConnection=queryMaxConnection  Enter MaxConnection from 1 to 10
  --querySubscription                      Enable Query subscription
  --queryTimeout=queryTimeout              Enter timeout from 1000ms to 60000ms
  --queryUnsafe                            Enable indexer unsafe
  --queryVersion=queryVersion              Enter query-version
  --type=(stage|primary)                   [default: primary]

See code: lib/commands/deployment/index.js

subql deployment:delete

Delete Deployment

USAGE
  $ subql deployment:delete

OPTIONS
  --deploymentID=deploymentID  Enter deployment ID
  --org=org                    Enter organization name
  --project_name=project_name  Enter project name

See code: lib/commands/deployment/delete.js

subql deployment:deploy

Deployment to hosted service

USAGE
  $ subql deployment:deploy

OPTIONS
  -d, --useDefaults                        Use default values for indexerVersion, queryVersion, dictionary, endpoint
  --dict=dict                              Enter dictionary
  --disableHistorical                      Disable Historical Data
  --endpoint=endpoint                      Enter endpoint
  --indexerBatchSize=indexerBatchSize      Enter batchSize from 1 to 30
  --indexerSubscription                    Enable Indexer subscription
  --indexerUnsafe                          Enable indexer unsafe
  --indexerVersion=indexerVersion          Enter indexer-version
  --indexerWorkers=indexerWorkers          Enter worker threads from 1 to 30
  --ipfsCID=ipfsCID                        Enter IPFS CID
  --org=org                                Enter organization name
  --projectName=projectName                Enter project name
  --queryAggregate                         Enable Aggregate
  --queryMaxConnection=queryMaxConnection  Enter MaxConnection from 1 to 10
  --querySubscription                      Enable Query subscription
  --queryTimeout=queryTimeout              Enter timeout from 1000ms to 60000ms
  --queryUnsafe                            Enable indexer unsafe
  --queryVersion=queryVersion              Enter query-version
  --type=(stage|primary)                   [default: primary]

See code: lib/commands/deployment/deploy.js

subql deployment:promote

Promote Deployment

USAGE
  $ subql deployment:promote

OPTIONS
  --deploymentID=deploymentID  Enter deployment ID
  --org=org                    Enter organization name
  --project_name=project_name  Enter project name

See code: lib/commands/deployment/promote.js

subql help [COMMAND]

display help for subql

USAGE
  $ subql help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

subql init [PROJECTNAME]

Initialize a scaffold subquery project

USAGE
  $ subql init [PROJECTNAME]

ARGUMENTS
  PROJECTNAME  Give the starter project name

OPTIONS
  -f, --force
  -l, --location=location  local folder to create the project in
  --install-dependencies   Install dependencies as well
  --npm                    Force using NPM instead of yarn, only works with `install-dependencies` flag

See code: lib/commands/init.js

subql migrate

Migrate Subquery project manifest to v1.0.0

USAGE
  $ subql migrate

OPTIONS
  -f, --force
  -l, --location=location  local folder to run migrate in
  --file=file

See code: lib/commands/migrate.js

subql project

Create/Delete project

USAGE
  $ subql project

OPTIONS
  --apiVersion=apiVersion    [default: 2] Enter api version
  --dedicatedDB=dedicatedDB  Enter dedicated DataBase
  --description=description  Enter description
  --gitRepo=gitRepo          Enter git repository
  --logoURL=logoURL          Enter logo URL
  --options=create|delete
  --org=org                  Enter organization name
  --projectName=projectName  Enter project name
  --subtitle=subtitle        Enter subtitle

See code: lib/commands/project/index.js

subql project:create-project

Create Project on Hosted Service

USAGE
  $ subql project:create-project

OPTIONS
  --apiVersion=apiVersion    [default: 2] Enter api version
  --dedicatedDB=dedicatedDB  Enter dedicated DataBase
  --description=description  Enter description
  --gitRepo=gitRepo          Enter git repository
  --logoURL=logoURL          Enter logo URL
  --org=org                  Enter organization name
  --projectName=projectName  Enter project name
  --subtitle=subtitle        Enter subtitle

See code: lib/commands/project/create-project.js

subql project:delete-project

Delete Project on Hosted Service

USAGE
  $ subql project:delete-project

OPTIONS
  --org=org                  Enter organization name
  --projectName=projectName  Enter project name

See code: lib/commands/project/delete-project.js

subql publish

Upload this SubQuery project to IPFS

USAGE
  $ subql publish

OPTIONS
  -f, --location=location  from project or manifest path
  -o, --output             Output IPFS CID
  --ipfs=ipfs              IPFS gateway endpoint

See code: lib/commands/publish.js

subql validate

Check a folder or github repo is a validate subquery project

USAGE
  $ subql validate

OPTIONS
  -l, --location=location                                                           local folder, github repo url or
                                                                                    IPFS cid

  --ipfs=ipfs                                                                       [default: https://unauthipfs.subquer
                                                                                    y.network/ipfs/api/v0] IPFS gateway
                                                                                    endpoint, used for validating
                                                                                    projects on IPFS

  --network-family=(Substrate|Avalanche|Terra|Cosmos|Algorand|Ethereum|Flare|Near)

  --silent

See code: lib/commands/validate.js

Keywords

oclif

FAQs

Package last updated on 10 May 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