@gpc-cli/core 0.9.21 → 0.9.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -5
- package/dist/index.d.ts +51 -1
- package/dist/index.js +323 -52
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @gpc-cli/core
|
|
2
2
|
|
|
3
|
-
Business logic and command orchestration for GPC.
|
|
3
|
+
Business logic and command orchestration for [GPC](https://github.com/yasserstudio/gpc) — the complete CLI for Google Play.
|
|
4
|
+
|
|
5
|
+
Use this package to call GPC commands programmatically in your own tools, scripts, or services.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
@@ -16,6 +18,7 @@ import {
|
|
|
16
18
|
promoteRelease,
|
|
17
19
|
getVitalsOverview,
|
|
18
20
|
listReviews,
|
|
21
|
+
analyzeBundle,
|
|
19
22
|
formatOutput,
|
|
20
23
|
} from "@gpc-cli/core";
|
|
21
24
|
|
|
@@ -34,9 +37,10 @@ await promoteRelease(context, {
|
|
|
34
37
|
|
|
35
38
|
// Check vitals
|
|
36
39
|
const vitals = await getVitalsOverview(context);
|
|
37
|
-
|
|
38
|
-
// Format output
|
|
39
40
|
console.log(formatOutput(vitals, "table"));
|
|
41
|
+
|
|
42
|
+
// Analyze bundle size
|
|
43
|
+
const analysis = await analyzeBundle("./app.aab");
|
|
40
44
|
```
|
|
41
45
|
|
|
42
46
|
## Command Groups
|
|
@@ -54,6 +58,7 @@ console.log(formatOutput(vitals, "table"));
|
|
|
54
58
|
| **Reports** | `listReports`, `downloadReport` |
|
|
55
59
|
| **Users** | `listUsers`, `inviteUser`, `updateUser`, `removeUser` |
|
|
56
60
|
| **Testers** | `listTesters`, `addTesters`, `removeTesters`, `importTestersFromCsv` |
|
|
61
|
+
| **Bundle** | `analyzeBundle`, `compareBundles` (zero-dependency AAB/APK size analysis) |
|
|
57
62
|
| **Publishing** | `publish` (end-to-end: upload + track + notes + commit) |
|
|
58
63
|
| **Validation** | `validateUploadFile`, `validateImage`, `validatePreSubmission` |
|
|
59
64
|
|
|
@@ -65,9 +70,10 @@ console.log(formatOutput(vitals, "table"));
|
|
|
65
70
|
- **Path safety** — `safePath()`, `safePathWithin()` for path traversal prevention
|
|
66
71
|
- **Plugin management** — `PluginManager`, `discoverPlugins()`, `scaffoldPlugin()`
|
|
67
72
|
|
|
68
|
-
##
|
|
73
|
+
## Documentation
|
|
69
74
|
|
|
70
|
-
|
|
75
|
+
- [Full documentation](https://yasserstudio.github.io/gpc/)
|
|
76
|
+
- [Architecture](https://yasserstudio.github.io/gpc/advanced/architecture)
|
|
71
77
|
|
|
72
78
|
## License
|
|
73
79
|
|
package/dist/index.d.ts
CHANGED
|
@@ -223,6 +223,7 @@ interface FastlaneDetection {
|
|
|
223
223
|
jsonKeyPath?: string;
|
|
224
224
|
lanes: FastlaneLane[];
|
|
225
225
|
metadataLanguages: string[];
|
|
226
|
+
parseWarnings: string[];
|
|
226
227
|
}
|
|
227
228
|
interface FastlaneLane {
|
|
228
229
|
name: string;
|
|
@@ -291,6 +292,7 @@ interface ValidateCheck {
|
|
|
291
292
|
interface ValidateResult {
|
|
292
293
|
valid: boolean;
|
|
293
294
|
checks: ValidateCheck[];
|
|
295
|
+
warnings: string[];
|
|
294
296
|
}
|
|
295
297
|
declare function validatePreSubmission(options: ValidateOptions): Promise<ValidateResult>;
|
|
296
298
|
|
|
@@ -514,6 +516,7 @@ interface GitReleaseNotes {
|
|
|
514
516
|
text: string;
|
|
515
517
|
commitCount: number;
|
|
516
518
|
since: string;
|
|
519
|
+
truncated: boolean;
|
|
517
520
|
}
|
|
518
521
|
declare function generateNotesFromGit(options?: GitNotesOptions): Promise<GitReleaseNotes>;
|
|
519
522
|
|
|
@@ -730,4 +733,51 @@ interface BundleComparison {
|
|
|
730
733
|
declare function analyzeBundle(filePath: string): Promise<BundleAnalysis>;
|
|
731
734
|
declare function compareBundles(before: BundleAnalysis, after: BundleAnalysis): BundleComparison;
|
|
732
735
|
|
|
733
|
-
|
|
736
|
+
interface StatusVitalMetric {
|
|
737
|
+
value: number | undefined;
|
|
738
|
+
threshold: number;
|
|
739
|
+
status: "ok" | "warn" | "breach" | "unknown";
|
|
740
|
+
}
|
|
741
|
+
interface StatusRelease {
|
|
742
|
+
track: string;
|
|
743
|
+
versionCode: string;
|
|
744
|
+
status: string;
|
|
745
|
+
userFraction: number | null;
|
|
746
|
+
}
|
|
747
|
+
interface StatusReviews {
|
|
748
|
+
windowDays: number;
|
|
749
|
+
averageRating: number | undefined;
|
|
750
|
+
previousAverageRating: number | undefined;
|
|
751
|
+
totalNew: number;
|
|
752
|
+
positivePercent: number | undefined;
|
|
753
|
+
}
|
|
754
|
+
interface AppStatus {
|
|
755
|
+
packageName: string;
|
|
756
|
+
fetchedAt: string;
|
|
757
|
+
cached: boolean;
|
|
758
|
+
releases: StatusRelease[];
|
|
759
|
+
vitals: {
|
|
760
|
+
windowDays: number;
|
|
761
|
+
crashes: StatusVitalMetric;
|
|
762
|
+
anr: StatusVitalMetric;
|
|
763
|
+
slowStarts: StatusVitalMetric;
|
|
764
|
+
slowRender: StatusVitalMetric;
|
|
765
|
+
};
|
|
766
|
+
reviews: StatusReviews;
|
|
767
|
+
}
|
|
768
|
+
interface GetAppStatusOptions {
|
|
769
|
+
days?: number;
|
|
770
|
+
vitalThresholds?: {
|
|
771
|
+
crashRate?: number;
|
|
772
|
+
anrRate?: number;
|
|
773
|
+
slowStartRate?: number;
|
|
774
|
+
slowRenderingRate?: number;
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
declare function loadStatusCache(packageName: string, ttlSeconds?: number): Promise<AppStatus | null>;
|
|
778
|
+
declare function saveStatusCache(packageName: string, data: AppStatus, ttlSeconds?: number): Promise<void>;
|
|
779
|
+
declare function getAppStatus(client: PlayApiClient, reporting: ReportingApiClient, packageName: string, options?: GetAppStatusOptions): Promise<AppStatus>;
|
|
780
|
+
declare function formatStatusTable(status: AppStatus): string;
|
|
781
|
+
declare function statusHasBreach(status: AppStatus): boolean;
|
|
782
|
+
|
|
783
|
+
export { ApiError, type AppInfo, type AppStatus, type AuditEntry, type BatchSyncResult, type BundleAnalysis, type BundleComparison, type BundleEntry, type CommandContext, ConfigError, type DiscoverPluginsOptions, type DryRunPublishResult, type DryRunResult, type DryRunUploadResult, type ExportImagesOptions, type ExportImagesSummary, type FastlaneDetection, type FastlaneLane, type FileValidationResult, GOOGLE_PLAY_LANGUAGES, type GetAppStatusOptions, type GitNotesOptions, type GitReleaseNotes, GpcError, type ImageValidationResult, type InternalSharingUploadResult, type ListIapOptions, type ListSubscriptionsOptions, type ListUsersOptions, type ListVoidedOptions, type ListingDiff, type ListingsResult, type LoadedPlugin, type MigrationResult, NetworkError, type OneTimeProductDiff, PERMISSION_PROPAGATION_WARNING, type ParsedMonth, PluginManager, type PublishOptions, type PublishResult, type PushResult, type ReleaseDiff, type ReleaseNotesValidation, type ReleaseStatusResult, type ReviewExportOptions, type ReviewsFilterOptions, SENSITIVE_ARG_KEYS, SENSITIVE_KEYS, type ScaffoldOptions, type ScaffoldResult, type Spinner, type StatusRelease, type StatusReviews, type StatusVitalMetric, type SubscriptionDiff, type SyncResult, type ThresholdResult, type UploadResult, type ValidateCheck, type ValidateOptions, type ValidateResult, type VitalsOverview, type VitalsQueryOptions, type VitalsTrendComparison, type WebhookPayload, acknowledgeProductPurchase, activateBasePlan, activateOffer, activatePurchaseOption, addRecoveryTargeting, addTesters, analyzeBundle, batchSyncInAppProducts, cancelRecoveryAction, cancelSubscriptionPurchase, checkThreshold, clearAuditLog, compareBundles, compareVitalsTrend, consumeProductPurchase, convertRegionPrices, createAuditEntry, createDeviceTier, createExternalTransaction, createInAppProduct, createOffer, createOneTimeOffer, createOneTimeProduct, createPurchaseOption, createRecoveryAction, createSpinner, createSubscription, createTrack, deactivateBasePlan, deactivateOffer, deactivatePurchaseOption, deferSubscriptionPurchase, deleteBasePlan, deleteImage, deleteInAppProduct, deleteListing, deleteOffer, deleteOneTimeOffer, deleteOneTimeProduct, deleteSubscription, deployRecoveryAction, detectFastlane, detectOutputFormat, diffListings, diffListingsCommand, diffOneTimeProduct, diffReleases, diffSubscription, discoverPlugins, downloadGeneratedApk, downloadReport, exportDataSafety, exportImages, exportReviews, formatCustomPayload, formatDiscordPayload, formatJunit, formatOutput, formatSlackPayload, formatStatusTable, generateMigrationPlan, generateNotesFromGit, getAppInfo, getAppStatus, getCountryAvailability, getDataSafety, getDeviceTier, getExternalTransaction, getInAppProduct, getListings, getOffer, getOneTimeOffer, getOneTimeProduct, getProductPurchase, getPurchaseOption, getReleasesStatus, getReview, getSubscription, getSubscriptionPurchase, getUser, getVitalsAnomalies, getVitalsAnr, getVitalsBattery, getVitalsCrashes, getVitalsMemory, getVitalsOverview, getVitalsRendering, getVitalsStartup, importDataSafety, importTestersFromCsv, initAudit, inviteUser, isFinancialReportType, isStatsReportType, isValidBcp47, isValidReportType, isValidStatsDimension, listAuditEvents, listDeviceTiers, listGeneratedApks, listImages, listInAppProducts, listOffers, listOneTimeOffers, listOneTimeProducts, listPurchaseOptions, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, loadStatusCache, migratePrices, parseAppfile, parseFastfile, parseGrantArg, parseMonth, promoteRelease, publish, pullListings, pushListings, readListingsFromDir, readReleaseNotesFromDir, redactAuditArgs, redactSensitive, refundExternalTransaction, refundOrder, removeTesters, removeUser, replyToReview, revokeSubscriptionPurchase, safePath, safePathWithin, saveStatusCache, scaffoldPlugin, searchAuditEvents, searchVitalsErrors, sendWebhook, sortResults, statusHasBreach, syncInAppProducts, updateAppDetails, updateDataSafety, updateInAppProduct, updateListing, updateOffer, updateOneTimeOffer, updateOneTimeProduct, updateRollout, updateSubscription, updateTrackConfig, updateUser, uploadExternallyHosted, uploadImage, uploadInternalSharing, uploadRelease, validateImage, validateLanguageCode, validatePackageName, validatePreSubmission, validateReleaseNotes, validateSku, validateTrackName, validateUploadFile, validateVersionCode, writeAuditLog, writeListingsToDir, writeMigrationOutput };
|