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

abc-tool-cli

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abc-tool-cli

CLI tool for managing web applications

latest
npmnpm
Version
0.0.9
Version published
Maintainers
1
Created
Source

abc-tools

CLI tool for managing web applications in the ABC system. This package provides comprehensive utilities for initializing, configuring, and managing different types of applications.

📦 Installation

pnpm add abc-tools

🚀 Key Features

1. Application Management

  • Initialize different types of applications (single, state, parent)
  • Fetch and update app configurations
  • Manage app lists and schemas

2. Database Management

  • Update database schemas
  • Generate initialization data for service workers
  • Sync database models across packages

3. Service Worker Setup

  • Configure service workers for different app types
  • Generate integrity hashes
  • Setup caching strategies

4. Data Fetching

  • Fetch app configurations from API
  • Retrieve topics and test data
  • Get member information and SEO data

5. File Management

  • Generate TypeScript and JSON files
  • Update environment configurations
  • Manage app icons and assets

📚 CLI Commands

tools init

Initialize configuration and fetch apps data.

tools init

What it does:

  • Fetches apps data from API
  • Creates data/listApp.ts with app configurations
  • Creates data/schema.ts with database schemas
  • Updates apps data successfully

tools get-list-app

Setup and update the list of applications.

tools get-list-app

What it does:

  • Fetches current apps data from API
  • Updates data/listApp.ts with latest configurations
  • Handles different app types (single, state, parent)

tools update-ver

Update version information across the project.

tools update-ver

What it does:

  • Updates version information in relevant files
  • Syncs version across packages
  • Maintains version consistency

tools update-db

Update database schemas and service worker initialization data.

tools update-db

What it does:

  • Reads database schema from data/schema.ts
  • Updates database models in packages/db/src/model/index.ts
  • Generates service worker initialization data
  • Syncs database version and stores

tools sw <appName>

Setup service worker for a specific application.

tools sw <appName> [options]

Options:

  • -t, --type <type>: Application type (single, parent, state) - default: single

Example:

tools sw asvab --type single

What it does:

  • Configures service worker for the specified app
  • Sets up caching strategies
  • Generates necessary files

tools init-app <appName>

Initialize and build an application.

tools init-app <appName> [options]

Options:

  • -e, --env <environment>: Environment (dev, staging, prod) - default: dev
  • -t, --type <type>: Application type (single, parent, state) - default: single

Examples:

# Initialize single app
tools init-app asvab --type single --env dev

# Initialize state app
tools init-app cdl --type state --env staging

# Initialize parent app
tools init-app easyprep --type parent --env prod

What it does:

  • Fetches app configuration and data
  • Processes topics and test data
  • Generates necessary files and configurations
  • Sets up environment variables
  • Creates service worker files

🔧 API Functions

Data Fetching

getDataSingleApp(appName)

Fetch app configuration data.

import { getDataSingleApp } from "abc-tools";

const appData = await getDataSingleApp("asvab");

getDataTopicsAndTest(appName)

Fetch topics and test data for an app.

import { getDataTopicsAndTest } from "abc-tools";

const { topics, tests } = await getDataTopicsAndTest("asvab");

getDataMember()

Fetch member information.

import { getDataMember } from "abc-tools";

const members = await getDataMember();

getDataSeo(appName)

Fetch SEO information for an app.

import { getDataSeo } from "abc-tools";

const seoInfo = await getDataSeo("asvab");

File Management

saveJSONFile(filePath, data)

Save data as JSON file.

import { saveJSONFile } from "abc-tools";

saveJSONFile("data/config.json", { key: "value" });

saveTSFile(filePath, exportName, data)

Save data as TypeScript file with export.

import { saveTSFile } from "abc-tools";

saveTSFile("src/config.ts", "appConfig", { name: "test" });

generateIcon(options)

Generate app icon from configuration.

import { generateIcon } from "abc-tools";

const icon = await generateIcon({
  appShortName: "asvab",
  bucket: "asvab-bucket",
});

Environment Management

updateEnv(options)

Update environment configuration.

import { updateEnv } from "abc-tools";

await updateEnv({
  appInfo: appData,
  environments: "dev",
  authSecret: "secret",
  type: "single",
  integrity: "hash",
});

genAuthSecret(environments)

Generate authentication secret.

import { genAuthSecret } from "abc-tools";

const secret = await genAuthSecret("dev");

🧪 Development

# Build package
pnpm build

# Development mode
pnpm dev

# Type checking
pnpm type

# Clean dist
pnpm clean

📦 Dependencies

Production Dependencies

  • abc-core - Core functionality
  • commander - CLI framework
  • axios - HTTP client
  • node-fetch - Fetch API
  • p-limit - Concurrency control
  • abc-model - Data models
  • uuid - UUID generation

Development Dependencies

  • @repo/eslint-config - ESLint configuration
  • @types/node - Node.js types

🔄 Workflow

Typical Usage Flow

  • Initialize Configuration

    tools init
    
  • Update Database

    tools update-db
    
  • Setup Service Worker

    tools sw asvab --type single
    
  • Initialize Application

    tools init-app asvab --type single --env dev
    

📄 License

MIT

FAQs

Package last updated on 17 Sep 2025

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