@gpc-cli/core 0.9.31 → 0.9.33
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/dist/index.d.ts +116 -2
- package/dist/index.js +1751 -86
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OutputFormat, ResolvedConfig, WebhookConfig } from '@gpc-cli/config';
|
|
2
2
|
import { AuthClient } from '@gpc-cli/auth';
|
|
3
3
|
import { GpcPlugin, PluginManifest, CommandEvent, CommandResult, PluginError, RequestEvent, ResponseEvent, PluginCommand } from '@gpc-cli/plugin-sdk';
|
|
4
|
-
import { PlayApiClient, Track, ExternallyHostedApk, ExternallyHostedApkResponse, Listing, ImageType, CountryAvailability, Image, AppDetails, Review, ReviewReplyResponse, Subscription, SubscriptionOffer, OffersListResponse, BasePlanMigratePricesRequest, InAppProduct, SubscriptionDeferResponse, ProductPurchase, SubscriptionPurchaseV2, VoidedPurchase, UsersApiClient, User, DeveloperPermission, Grant, MetricRow, ReportingDimension, ReportingAggregation, VitalsMetricSet, ReportingApiClient, AnomalyDetectionResponse, MetricSetResponse, ErrorIssuesResponse, ConvertRegionPricesResponse, ReportType, StatsDimension, ReportBucket, Testers, AppRecoveryTargeting, AppRecoveryAction, CreateAppRecoveryActionRequest, DataSafety, ExternalTransaction, ExternalTransactionRefund, DeviceTierConfig, OneTimeOffer, OneTimeProduct, OneTimeOffersListResponse, OneTimeProductsListResponse, GamesApiClient, Achievement, GameEvent, Leaderboard, EnterpriseApiClient, CustomApp, GeneratedApk, PurchaseOption, PurchaseOptionsListResponse } from '@gpc-cli/api';
|
|
4
|
+
import { PlayApiClient, Track, ExternallyHostedApk, ExternallyHostedApkResponse, UploadProgressEvent, ResumableUploadOptions, Listing, ImageType, CountryAvailability, Image, AppDetails, Review, ReviewReplyResponse, Subscription, SubscriptionOffer, OffersListResponse, BasePlanMigratePricesRequest, InAppProduct, SubscriptionDeferResponse, ProductPurchase, SubscriptionPurchaseV2, VoidedPurchase, UsersApiClient, User, DeveloperPermission, Grant, MetricRow, ReportingDimension, ReportingAggregation, VitalsMetricSet, ReportingApiClient, AnomalyDetectionResponse, MetricSetResponse, ErrorIssuesResponse, ConvertRegionPricesResponse, ReportType, StatsDimension, ReportBucket, Testers, AppRecoveryTargeting, AppRecoveryAction, CreateAppRecoveryActionRequest, DataSafety, ExternalTransaction, ExternalTransactionRefund, DeviceTierConfig, OneTimeOffer, OneTimeProduct, OneTimeOffersListResponse, OneTimeProductsListResponse, GamesApiClient, Achievement, GameEvent, Leaderboard, EnterpriseApiClient, CustomApp, GeneratedApk, PurchaseOption, PurchaseOptionsListResponse } from '@gpc-cli/api';
|
|
5
5
|
|
|
6
6
|
declare class GpcError extends Error {
|
|
7
7
|
readonly code: string;
|
|
@@ -155,6 +155,8 @@ declare function uploadRelease(client: PlayApiClient, packageName: string, fileP
|
|
|
155
155
|
mappingFile?: string;
|
|
156
156
|
dryRun?: boolean;
|
|
157
157
|
onProgress?: (uploaded: number, total: number) => void;
|
|
158
|
+
onUploadProgress?: (event: UploadProgressEvent) => void;
|
|
159
|
+
uploadOptions?: Pick<ResumableUploadOptions, "chunkSize" | "resumeSessionUri" | "maxResumeAttempts">;
|
|
158
160
|
}): Promise<UploadResult | DryRunUploadResult>;
|
|
159
161
|
declare function getReleasesStatus(client: PlayApiClient, packageName: string, trackFilter?: string): Promise<ReleaseStatusResult[]>;
|
|
160
162
|
declare function promoteRelease(client: PlayApiClient, packageName: string, fromTrack: string, toTrack: string, options?: {
|
|
@@ -168,6 +170,14 @@ declare function updateRollout(client: PlayApiClient, packageName: string, track
|
|
|
168
170
|
declare function listTracks(client: PlayApiClient, packageName: string): Promise<Track[]>;
|
|
169
171
|
declare function createTrack(client: PlayApiClient, packageName: string, trackName: string): Promise<Track>;
|
|
170
172
|
declare function updateTrackConfig(client: PlayApiClient, packageName: string, trackName: string, config: Record<string, unknown>): Promise<Track>;
|
|
173
|
+
/**
|
|
174
|
+
* Fetch release notes from the latest active release on a given track.
|
|
175
|
+
* Opens and discards an edit — read-only, no mutations.
|
|
176
|
+
*/
|
|
177
|
+
declare function fetchReleaseNotes(client: PlayApiClient, packageName: string, track: string): Promise<{
|
|
178
|
+
language: string;
|
|
179
|
+
text: string;
|
|
180
|
+
}[]>;
|
|
171
181
|
interface ReleaseDiff {
|
|
172
182
|
field: string;
|
|
173
183
|
track1Value: string;
|
|
@@ -795,6 +805,109 @@ declare function safePath(userPath: string): string;
|
|
|
795
805
|
*/
|
|
796
806
|
declare function safePathWithin(userPath: string, baseDir: string): string;
|
|
797
807
|
|
|
808
|
+
interface InitOptions {
|
|
809
|
+
dir: string;
|
|
810
|
+
app?: string;
|
|
811
|
+
ci?: "github" | "gitlab";
|
|
812
|
+
skipExisting?: boolean;
|
|
813
|
+
}
|
|
814
|
+
interface InitResult {
|
|
815
|
+
created: string[];
|
|
816
|
+
skipped: string[];
|
|
817
|
+
}
|
|
818
|
+
declare function initProject(options: InitOptions): Promise<InitResult>;
|
|
819
|
+
|
|
820
|
+
type FindingSeverity = "critical" | "error" | "warning" | "info";
|
|
821
|
+
/** Severity ordering for threshold comparisons. */
|
|
822
|
+
declare const SEVERITY_ORDER: Record<FindingSeverity, number>;
|
|
823
|
+
interface PreflightFinding {
|
|
824
|
+
/** Scanner name, e.g. "manifest", "permissions" */
|
|
825
|
+
scanner: string;
|
|
826
|
+
/** Machine-readable rule ID, e.g. "targetSdk-below-minimum" */
|
|
827
|
+
ruleId: string;
|
|
828
|
+
severity: FindingSeverity;
|
|
829
|
+
title: string;
|
|
830
|
+
message: string;
|
|
831
|
+
suggestion?: string;
|
|
832
|
+
/** Link to the relevant Google Play policy page */
|
|
833
|
+
policyUrl?: string;
|
|
834
|
+
}
|
|
835
|
+
interface PreflightContext {
|
|
836
|
+
aabPath?: string;
|
|
837
|
+
manifest?: ParsedManifest;
|
|
838
|
+
zipEntries?: ZipEntryInfo[];
|
|
839
|
+
metadataDir?: string;
|
|
840
|
+
sourceDir?: string;
|
|
841
|
+
config: PreflightConfig;
|
|
842
|
+
}
|
|
843
|
+
interface PreflightResult {
|
|
844
|
+
scanners: string[];
|
|
845
|
+
findings: PreflightFinding[];
|
|
846
|
+
summary: Record<FindingSeverity, number>;
|
|
847
|
+
passed: boolean;
|
|
848
|
+
durationMs: number;
|
|
849
|
+
}
|
|
850
|
+
interface PreflightScanner {
|
|
851
|
+
name: string;
|
|
852
|
+
description: string;
|
|
853
|
+
requires: ("manifest" | "zipEntries" | "metadataDir" | "sourceDir")[];
|
|
854
|
+
scan(ctx: PreflightContext): Promise<PreflightFinding[]>;
|
|
855
|
+
}
|
|
856
|
+
interface PreflightConfig {
|
|
857
|
+
failOn: FindingSeverity;
|
|
858
|
+
targetSdkMinimum: number;
|
|
859
|
+
maxDownloadSizeMb: number;
|
|
860
|
+
allowedPermissions: string[];
|
|
861
|
+
disabledRules: string[];
|
|
862
|
+
severityOverrides: Record<string, FindingSeverity>;
|
|
863
|
+
}
|
|
864
|
+
interface PreflightOptions {
|
|
865
|
+
aabPath?: string;
|
|
866
|
+
metadataDir?: string;
|
|
867
|
+
sourceDir?: string;
|
|
868
|
+
scanners?: string[];
|
|
869
|
+
failOn?: FindingSeverity;
|
|
870
|
+
configPath?: string;
|
|
871
|
+
}
|
|
872
|
+
interface ParsedManifest {
|
|
873
|
+
packageName: string;
|
|
874
|
+
versionCode: number;
|
|
875
|
+
versionName: string;
|
|
876
|
+
minSdk: number;
|
|
877
|
+
targetSdk: number;
|
|
878
|
+
debuggable: boolean;
|
|
879
|
+
testOnly: boolean;
|
|
880
|
+
usesCleartextTraffic: boolean;
|
|
881
|
+
extractNativeLibs: boolean;
|
|
882
|
+
permissions: string[];
|
|
883
|
+
features: ManifestFeature[];
|
|
884
|
+
activities: ManifestComponent[];
|
|
885
|
+
services: ManifestComponent[];
|
|
886
|
+
receivers: ManifestComponent[];
|
|
887
|
+
providers: ManifestComponent[];
|
|
888
|
+
}
|
|
889
|
+
interface ManifestFeature {
|
|
890
|
+
name: string;
|
|
891
|
+
required: boolean;
|
|
892
|
+
}
|
|
893
|
+
interface ManifestComponent {
|
|
894
|
+
name: string;
|
|
895
|
+
exported?: boolean;
|
|
896
|
+
foregroundServiceType?: string;
|
|
897
|
+
hasIntentFilter: boolean;
|
|
898
|
+
}
|
|
899
|
+
interface ZipEntryInfo {
|
|
900
|
+
path: string;
|
|
901
|
+
compressedSize: number;
|
|
902
|
+
uncompressedSize: number;
|
|
903
|
+
}
|
|
904
|
+
declare const DEFAULT_PREFLIGHT_CONFIG: PreflightConfig;
|
|
905
|
+
|
|
906
|
+
declare function getAllScannerNames(): string[];
|
|
907
|
+
declare function runPreflight(options: PreflightOptions): Promise<PreflightResult>;
|
|
908
|
+
|
|
909
|
+
declare function loadPreflightConfig(configPath?: string): Promise<PreflightConfig>;
|
|
910
|
+
|
|
798
911
|
/**
|
|
799
912
|
* Sort utility for CLI list command results.
|
|
800
913
|
*
|
|
@@ -1033,6 +1146,7 @@ interface StatusDiff {
|
|
|
1033
1146
|
}
|
|
1034
1147
|
interface GetAppStatusOptions {
|
|
1035
1148
|
days?: number;
|
|
1149
|
+
reviewDays?: number;
|
|
1036
1150
|
sections?: string[];
|
|
1037
1151
|
vitalThresholds?: {
|
|
1038
1152
|
crashRate?: number;
|
|
@@ -1060,4 +1174,4 @@ declare function trackBreachState(packageName: string, isBreaching: boolean): Pr
|
|
|
1060
1174
|
declare function sendNotification(title: string, body: string): void;
|
|
1061
1175
|
declare function statusHasBreach(status: AppStatus): boolean;
|
|
1062
1176
|
|
|
1063
|
-
export { ApiError, type AppInfo, type AppStatus, type AuditEntry, type BatchSyncResult, type BundleAnalysis, type BundleComparison, type BundleEntry, type BundleSizeCheckResult, type BundleSizeConfig, type CommandContext, ConfigError, DEFAULT_LIMITS, type DiffToken, type DiscoverPluginsOptions, type DryRunPublishResult, type DryRunResult, type DryRunUploadResult, type ExportImagesOptions, type ExportImagesSummary, type FastlaneDetection, type FastlaneLane, type FieldLintResult, 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 ListingFieldLimits, type ListingLintResult, type ListingsResult, type LoadedPlugin, type MigrationResult, NetworkError, type OneTimeProductDiff, PERMISSION_PROPAGATION_WARNING, type ParsedMonth, PluginManager, type PublishOptions, type PublishResult, type PushResult, type QuotaUsage, type ReleaseDiff, type ReleaseNotesValidation, type ReleaseStatusResult, type ReviewAnalysis, type ReviewExportOptions, type ReviewsFilterOptions, SENSITIVE_ARG_KEYS, SENSITIVE_KEYS, type ScaffoldOptions, type ScaffoldResult, type Spinner, type StatusDiff, type StatusRelease, type StatusReviews, type StatusVitalMetric, type SubscriptionAnalytics, type SubscriptionDiff, type SyncResult, type ThresholdResult, type TrainConfig, type TrainState, type UploadResult, type ValidateCheck, type ValidateOptions, type ValidateResult, type VersionVitalsComparison, type VersionVitalsRow, type VitalsOverview, type VitalsQueryOptions, type VitalsTrendComparison, type WatchOptions, type WatchVitalsOptions, type WebhookPayload, abortTrain, acknowledgeProductPurchase, activateBasePlan, activateOffer, activatePurchaseOption, addRecoveryTargeting, addTesters, advanceTrain, analyzeBundle, analyzeRemoteListings, analyzeReviews, batchSyncInAppProducts, cancelRecoveryAction, cancelSubscriptionPurchase, checkBundleSize, checkThreshold, clearAuditLog, compareBundles, compareVersionVitals, compareVitalsTrend, computeStatusDiff, consumeProductPurchase, convertRegionPrices, createAuditEntry, createDeviceTier, createEnterpriseApp, createExternalTransaction, createGrant, createInAppProduct, createOffer, createOneTimeOffer, createOneTimeProduct, createPurchaseOption, createRecoveryAction, createSpinner, createSubscription, createTrack, deactivateBasePlan, deactivateOffer, deactivatePurchaseOption, deferSubscriptionPurchase, deleteBasePlan, deleteGrant, deleteImage, deleteInAppProduct, deleteListing, deleteOffer, deleteOneTimeOffer, deleteOneTimeProduct, deleteSubscription, deployRecoveryAction, detectFastlane, detectOutputFormat, diffListings, diffListingsCommand, diffListingsEnhanced, diffOneTimeProduct, diffReleases, diffSubscription, discoverPlugins, downloadGeneratedApk, downloadReport, exportDataSafety, exportImages, exportReviews, formatCustomPayload, formatDiscordPayload, formatJunit, formatOutput, formatSlackPayload, formatStatusDiff, formatStatusSummary, formatStatusTable, formatWordDiff, generateMigrationPlan, generateNotesFromGit, getAppInfo, getAppStatus, getCountryAvailability, getDataSafety, getDeviceTier, getExternalTransaction, getInAppProduct, getListings, getOffer, getOneTimeOffer, getOneTimeProduct, getProductPurchase, getPurchaseOption, getQuotaUsage, getReleasesStatus, getReview, getSubscription, getSubscriptionAnalytics, getSubscriptionPurchase, getTrainStatus, getUser, getVitalsAnomalies, getVitalsAnr, getVitalsBattery, getVitalsCrashes, getVitalsLmk, getVitalsMemory, getVitalsOverview, getVitalsRendering, getVitalsStartup, importDataSafety, importTestersFromCsv, initAudit, inviteUser, isFinancialReportType, isStatsReportType, isValidBcp47, isValidReportType, isValidStatsDimension, lintListing, lintListings, lintLocalListings, listAchievements, listAuditEvents, listDeviceTiers, listEnterpriseApps, listEvents, listGeneratedApks, listGrants, listImages, listInAppProducts, listLeaderboards, listOffers, listOneTimeOffers, listOneTimeProducts, listPurchaseOptions, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, loadStatusCache, maybePaginate, migratePrices, parseAppfile, parseFastfile, parseGrantArg, parseMonth, pauseTrain, promoteRelease, publish, pullListings, pushListings, readListingsFromDir, readReleaseNotesFromDir, redactAuditArgs, redactSensitive, refundExternalTransaction, refundOrder, refundSubscriptionV2, removeTesters, removeUser, replyToReview, revokeSubscriptionPurchase, runWatchLoop, safePath, safePathWithin, saveStatusCache, scaffoldPlugin, searchAuditEvents, searchVitalsErrors, sendNotification, sendWebhook, sortResults, startTrain, statusHasBreach, syncInAppProducts, topFiles, trackBreachState, updateAppDetails, updateDataSafety, updateGrant, updateInAppProduct, updateListing, updateOffer, updateOneTimeOffer, updateOneTimeProduct, updateRollout, updateSubscription, updateTrackConfig, updateUser, uploadExternallyHosted, uploadImage, uploadInternalSharing, uploadRelease, validateImage, validateLanguageCode, validatePackageName, validatePreSubmission, validateReleaseNotes, validateSku, validateTrackName, validateUploadFile, validateVersionCode, watchVitalsWithAutoHalt, wordDiff, writeAuditLog, writeListingsToDir, writeMigrationOutput };
|
|
1177
|
+
export { ApiError, type AppInfo, type AppStatus, type AuditEntry, type BatchSyncResult, type BundleAnalysis, type BundleComparison, type BundleEntry, type BundleSizeCheckResult, type BundleSizeConfig, type CommandContext, ConfigError, DEFAULT_LIMITS, DEFAULT_PREFLIGHT_CONFIG, type DiffToken, type DiscoverPluginsOptions, type DryRunPublishResult, type DryRunResult, type DryRunUploadResult, type ExportImagesOptions, type ExportImagesSummary, type FastlaneDetection, type FastlaneLane, type FieldLintResult, type FileValidationResult, type FindingSeverity, GOOGLE_PLAY_LANGUAGES, type GetAppStatusOptions, type GitNotesOptions, type GitReleaseNotes, GpcError, type ImageValidationResult, type InitOptions, type InitResult, type InternalSharingUploadResult, type ListIapOptions, type ListSubscriptionsOptions, type ListUsersOptions, type ListVoidedOptions, type ListingDiff, type ListingFieldLimits, type ListingLintResult, type ListingsResult, type LoadedPlugin, type MigrationResult, NetworkError, type OneTimeProductDiff, PERMISSION_PROPAGATION_WARNING, type ParsedManifest, type ParsedMonth, PluginManager, type PreflightConfig, type PreflightFinding, type PreflightOptions, type PreflightResult, type PreflightScanner, type PublishOptions, type PublishResult, type PushResult, type QuotaUsage, type ReleaseDiff, type ReleaseNotesValidation, type ReleaseStatusResult, type ReviewAnalysis, type ReviewExportOptions, type ReviewsFilterOptions, SENSITIVE_ARG_KEYS, SENSITIVE_KEYS, SEVERITY_ORDER, type ScaffoldOptions, type ScaffoldResult, type Spinner, type StatusDiff, type StatusRelease, type StatusReviews, type StatusVitalMetric, type SubscriptionAnalytics, type SubscriptionDiff, type SyncResult, type ThresholdResult, type TrainConfig, type TrainState, type UploadResult, type ValidateCheck, type ValidateOptions, type ValidateResult, type VersionVitalsComparison, type VersionVitalsRow, type VitalsOverview, type VitalsQueryOptions, type VitalsTrendComparison, type WatchOptions, type WatchVitalsOptions, type WebhookPayload, abortTrain, acknowledgeProductPurchase, activateBasePlan, activateOffer, activatePurchaseOption, addRecoveryTargeting, addTesters, advanceTrain, analyzeBundle, analyzeRemoteListings, analyzeReviews, batchSyncInAppProducts, cancelRecoveryAction, cancelSubscriptionPurchase, checkBundleSize, checkThreshold, clearAuditLog, compareBundles, compareVersionVitals, compareVitalsTrend, computeStatusDiff, consumeProductPurchase, convertRegionPrices, createAuditEntry, createDeviceTier, createEnterpriseApp, createExternalTransaction, createGrant, createInAppProduct, createOffer, createOneTimeOffer, createOneTimeProduct, createPurchaseOption, createRecoveryAction, createSpinner, createSubscription, createTrack, deactivateBasePlan, deactivateOffer, deactivatePurchaseOption, deferSubscriptionPurchase, deleteBasePlan, deleteGrant, deleteImage, deleteInAppProduct, deleteListing, deleteOffer, deleteOneTimeOffer, deleteOneTimeProduct, deleteSubscription, deployRecoveryAction, detectFastlane, detectOutputFormat, diffListings, diffListingsCommand, diffListingsEnhanced, diffOneTimeProduct, diffReleases, diffSubscription, discoverPlugins, downloadGeneratedApk, downloadReport, exportDataSafety, exportImages, exportReviews, fetchReleaseNotes, formatCustomPayload, formatDiscordPayload, formatJunit, formatOutput, formatSlackPayload, formatStatusDiff, formatStatusSummary, formatStatusTable, formatWordDiff, generateMigrationPlan, generateNotesFromGit, getAllScannerNames, getAppInfo, getAppStatus, getCountryAvailability, getDataSafety, getDeviceTier, getExternalTransaction, getInAppProduct, getListings, getOffer, getOneTimeOffer, getOneTimeProduct, getProductPurchase, getPurchaseOption, getQuotaUsage, getReleasesStatus, getReview, getSubscription, getSubscriptionAnalytics, getSubscriptionPurchase, getTrainStatus, getUser, getVitalsAnomalies, getVitalsAnr, getVitalsBattery, getVitalsCrashes, getVitalsLmk, getVitalsMemory, getVitalsOverview, getVitalsRendering, getVitalsStartup, importDataSafety, importTestersFromCsv, initAudit, initProject, inviteUser, isFinancialReportType, isStatsReportType, isValidBcp47, isValidReportType, isValidStatsDimension, lintListing, lintListings, lintLocalListings, listAchievements, listAuditEvents, listDeviceTiers, listEnterpriseApps, listEvents, listGeneratedApks, listGrants, listImages, listInAppProducts, listLeaderboards, listOffers, listOneTimeOffers, listOneTimeProducts, listPurchaseOptions, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, loadPreflightConfig, loadStatusCache, maybePaginate, migratePrices, parseAppfile, parseFastfile, parseGrantArg, parseMonth, pauseTrain, promoteRelease, publish, pullListings, pushListings, readListingsFromDir, readReleaseNotesFromDir, redactAuditArgs, redactSensitive, refundExternalTransaction, refundOrder, refundSubscriptionV2, removeTesters, removeUser, replyToReview, revokeSubscriptionPurchase, runPreflight, runWatchLoop, safePath, safePathWithin, saveStatusCache, scaffoldPlugin, searchAuditEvents, searchVitalsErrors, sendNotification, sendWebhook, sortResults, startTrain, statusHasBreach, syncInAppProducts, topFiles, trackBreachState, updateAppDetails, updateDataSafety, updateGrant, updateInAppProduct, updateListing, updateOffer, updateOneTimeOffer, updateOneTimeProduct, updateRollout, updateSubscription, updateTrackConfig, updateUser, uploadExternallyHosted, uploadImage, uploadInternalSharing, uploadRelease, validateImage, validateLanguageCode, validatePackageName, validatePreSubmission, validateReleaseNotes, validateSku, validateTrackName, validateUploadFile, validateVersionCode, watchVitalsWithAutoHalt, wordDiff, writeAuditLog, writeListingsToDir, writeMigrationOutput };
|