JSPM

  • Created
  • Published
  • Downloads 288
  • Score
    100M100P100Q92780F
  • License MIT

Business logic and command orchestration for GPC

Package Exports

  • @gpc-cli/core

Readme

@gpc-cli/core

Business logic and command orchestration for GPC — the complete CLI for Google Play.

Use this package to call GPC commands programmatically in your own tools, scripts, or services.

Install

npm install @gpc-cli/core

Usage

import {
  uploadRelease,
  promoteRelease,
  getVitalsOverview,
  listReviews,
  analyzeBundle,
  formatOutput,
} from "@gpc-cli/core";

// Upload a release
const result = await uploadRelease(context, {
  file: "app.aab",
  track: "internal",
});

// Promote between tracks
await promoteRelease(context, {
  from: "internal",
  to: "production",
  rollout: 0.1,
});

// Check vitals
const vitals = await getVitalsOverview(context);
console.log(formatOutput(vitals, "table"));

// Analyze bundle size
const analysis = await analyzeBundle("./app.aab");

Command Groups

Group Functions
Releases uploadRelease, promoteRelease, updateRollout, getReleasesStatus, listTracks
Listings getListings, updateListing, pullListings, pushListings, diffListings
Images listImages, uploadImage, deleteImage
Reviews listReviews, getReview, replyToReview, exportReviews
Vitals getVitalsOverview, getVitalsCrashes, getVitalsAnr, getVitalsStartup, compareVitalsTrend, checkThreshold
Subscriptions listSubscriptions, createSubscription, updateSubscription, deleteSubscription, listOffers, createOffer
IAP listInAppProducts, createInAppProduct, syncInAppProducts
Purchases getProductPurchase, acknowledgeProductPurchase, refundOrder
Reports listReports, downloadReport
Users listUsers, inviteUser, updateUser, removeUser
Testers listTesters, addTesters, removeTesters, importTestersFromCsv
Bundle analyzeBundle, compareBundles (zero-dependency AAB/APK size analysis)
Publishing publish (end-to-end: upload + track + notes + commit)
Validation validateUploadFile, validateImage, validatePreSubmission

Utilities

  • Output formattingformatOutput(), detectOutputFormat(), redactSensitive()
  • Error hierarchyGpcError, ConfigError, ApiError, NetworkError with exit codes
  • Audit logginginitAudit(), writeAuditLog() for write operation tracking
  • Path safetysafePath(), safePathWithin() for path traversal prevention
  • Plugin managementPluginManager, discoverPlugins(), scaffoldPlugin()

Documentation

License

MIT