@gpc-cli/core 0.9.46 → 0.9.47

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 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, EditCommitOptions, Track, ExternallyHostedApk, ExternallyHostedApkResponse, DeobfuscationFileType, UploadProgressEvent, ResumableUploadOptions, Listing, ImageType, CountryAvailability, Image, AppDetails, Review, ReviewReplyResponse, Subscription, SubscriptionOffer, OffersListResponse, BasePlanMigratePricesRequest, InAppProduct, Order, SubscriptionDeferResponse, SubscriptionsV2DeferResponse, ProductPurchase, ProductPurchaseV2, 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 } from '@gpc-cli/api';
4
+ import { PlayApiClient, EditCommitOptions, Track, ExternallyHostedApk, ExternallyHostedApkResponse, DeobfuscationFileType, UploadProgressEvent, ResumableUploadOptions, Listing, ImageType, CountryAvailability, Image, AppDetails, Review, ReviewReplyResponse, Subscription, SubscriptionOffer, OffersListResponse, BasePlanMigratePricesRequest, InAppProduct, Order, SubscriptionDeferResponse, SubscriptionsV2DeferResponse, ProductPurchase, ProductPurchaseV2, SubscriptionPurchaseV2, VoidedPurchase, UsersApiClient, User, DeveloperLevelPermission, 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 } from '@gpc-cli/api';
5
5
 
6
6
  declare class GpcError extends Error {
7
7
  readonly code: string;
@@ -570,8 +570,8 @@ declare function listUsers(client: UsersApiClient, developerId: string, options?
570
570
  nextPageToken?: string;
571
571
  }>;
572
572
  declare function getUser(client: UsersApiClient, developerId: string, email: string): Promise<User>;
573
- declare function inviteUser(client: UsersApiClient, developerId: string, email: string, permissions?: DeveloperPermission[], grants?: Grant[]): Promise<User>;
574
- declare function updateUser(client: UsersApiClient, developerId: string, userId: string, permissions?: DeveloperPermission[], grants?: Grant[]): Promise<User>;
573
+ declare function inviteUser(client: UsersApiClient, developerId: string, email: string, permissions?: DeveloperLevelPermission[], grants?: Grant[]): Promise<User>;
574
+ declare function updateUser(client: UsersApiClient, developerId: string, userId: string, permissions?: DeveloperLevelPermission[], grants?: Grant[]): Promise<User>;
575
575
  declare function removeUser(client: UsersApiClient, developerId: string, userId: string): Promise<void>;
576
576
  declare function parseGrantArg(grantStr: string): Grant;
577
577
 
@@ -602,6 +602,7 @@ declare function getVitalsBattery(reporting: ReportingApiClient, packageName: st
602
602
  declare function getVitalsMemory(reporting: ReportingApiClient, packageName: string, options?: VitalsQueryOptions): Promise<MetricSetResponse>;
603
603
  /** LMK-specific query: enforces DAILY aggregation as required by the API. */
604
604
  declare function getVitalsLmk(reporting: ReportingApiClient, packageName: string, options?: VitalsQueryOptions): Promise<MetricSetResponse>;
605
+ declare function getVitalsErrorCount(reporting: ReportingApiClient, packageName: string, options?: VitalsQueryOptions): Promise<MetricSetResponse>;
605
606
  declare function getVitalsAnomalies(reporting: ReportingApiClient, packageName: string): Promise<AnomalyDetectionResponse>;
606
607
  declare function searchVitalsErrors(reporting: ReportingApiClient, packageName: string, options?: {
607
608
  filter?: string;
@@ -704,9 +705,7 @@ declare function deployRecoveryAction(client: PlayApiClient, packageName: string
704
705
  declare function createRecoveryAction(client: PlayApiClient, packageName: string, request: CreateAppRecoveryActionRequest): Promise<AppRecoveryAction>;
705
706
  declare function addRecoveryTargeting(client: PlayApiClient, packageName: string, actionId: string, targeting: AppRecoveryTargeting): Promise<AppRecoveryAction>;
706
707
 
707
- declare function getDataSafety(client: PlayApiClient, packageName: string): Promise<DataSafety>;
708
708
  declare function updateDataSafety(client: PlayApiClient, packageName: string, data: DataSafety): Promise<DataSafety>;
709
- declare function exportDataSafety(client: PlayApiClient, packageName: string, outputPath: string): Promise<DataSafety>;
710
709
  declare function importDataSafety(client: PlayApiClient, packageName: string, filePath: string): Promise<DataSafety>;
711
710
 
712
711
  declare function createExternalTransaction(client: PlayApiClient, packageName: string, data: ExternalTransaction): Promise<ExternalTransaction>;
@@ -1301,4 +1300,4 @@ declare function decodeNotification(base64Payload: string): DecodedNotification;
1301
1300
  */
1302
1301
  declare function formatNotification(notification: DecodedNotification): Record<string, unknown>;
1303
1302
 
1304
- export { ApiError, type AppInfo, type AppStatus, type AuditEntry, type BatchSyncResult, type BundleAnalysis, type BundleComparison, type BundleEntry, type BundleSizeCheckResult, type BundleSizeConfig, type ChangelogEntry, type CommandContext, ConfigError, type CreateEnterpriseAppParams, DEFAULT_LIMITS, DEFAULT_PREFLIGHT_CONFIG, type DecodedNotification, type DiffToken, type DiscoverPluginsOptions, type DryRunPublishResult, type DryRunResult, type DryRunUploadResult, type ExportImagesOptions, type ExportImagesSummary, type FastlaneDetection, type FastlaneLane, type FetchChangelogOptions, 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, type RtdnStatus, 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, addRecoveryTargeting, addTesters, advanceTrain, analyzeBundle, analyzeRemoteListings, analyzeReviews, batchGetOrders, batchSyncInAppProducts, cancelRecoveryAction, cancelSubscriptionPurchase, cancelSubscriptionV2, checkBundleSize, checkThreshold, clearAuditLog, compareBundles, compareVersionVitals, compareVitalsTrend, computeStatusDiff, consumeProductPurchase, convertRegionPrices, createAuditEntry, createDeviceTier, createEnterpriseApp, createExternalTransaction, createGrant, createInAppProduct, createOffer, createOneTimeOffer, createOneTimeProduct, createRecoveryAction, createSpinner, createSubscription, createTrack, deactivateBasePlan, deactivateOffer, decodeNotification, deferSubscriptionPurchase, deferSubscriptionV2, deleteBasePlan, deleteGrant, deleteImage, deleteInAppProduct, deleteListing, deleteOffer, deleteOneTimeOffer, deleteOneTimeProduct, deleteSubscription, deployRecoveryAction, detectFastlane, detectOutputFormat, diffListings, diffListingsCommand, diffListingsEnhanced, diffOneTimeProduct, diffReleases, diffSubscription, discoverPlugins, downloadGeneratedApk, downloadReport, exportDataSafety, exportImages, exportReviews, fetchChangelog, fetchReleaseNotes, formatChangelogEntry, formatCustomPayload, formatDiscordPayload, formatJunit, formatNotification, formatOutput, formatSlackPayload, formatStatusDiff, formatStatusSummary, formatStatusTable, formatWordDiff, generateMigrationPlan, generateNotesFromGit, getAllScannerNames, getAppInfo, getAppStatus, getCountryAvailability, getDataSafety, getDeviceTier, getExternalTransaction, getInAppProduct, getListings, getOffer, getOneTimeOffer, getOneTimeProduct, getOrderDetails, getProductPurchase, getProductPurchaseV2, getQuotaUsage, getReleasesStatus, getReview, getRtdnStatus, 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, listEvents, listGeneratedApks, listGrants, listImages, listInAppProducts, listLeaderboards, listOffers, listOneTimeOffers, listOneTimeProducts, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, loadPreflightConfig, loadStatusCache, maybePaginate, migratePrices, parseAppfile, parseFastfile, parseGrantArg, parseMonth, pauseTrain, promoteRelease, publish, publishEnterpriseApp, pullListings, pushListings, readListingsFromDir, readReleaseNotesFromDir, redactAuditArgs, redactSensitive, refundExternalTransaction, refundOrder, relativeTime, 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 };
1303
+ export { ApiError, type AppInfo, type AppStatus, type AuditEntry, type BatchSyncResult, type BundleAnalysis, type BundleComparison, type BundleEntry, type BundleSizeCheckResult, type BundleSizeConfig, type ChangelogEntry, type CommandContext, ConfigError, type CreateEnterpriseAppParams, DEFAULT_LIMITS, DEFAULT_PREFLIGHT_CONFIG, type DecodedNotification, type DiffToken, type DiscoverPluginsOptions, type DryRunPublishResult, type DryRunResult, type DryRunUploadResult, type ExportImagesOptions, type ExportImagesSummary, type FastlaneDetection, type FastlaneLane, type FetchChangelogOptions, 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, type RtdnStatus, 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, addRecoveryTargeting, addTesters, advanceTrain, analyzeBundle, analyzeRemoteListings, analyzeReviews, batchGetOrders, batchSyncInAppProducts, cancelRecoveryAction, cancelSubscriptionPurchase, cancelSubscriptionV2, checkBundleSize, checkThreshold, clearAuditLog, compareBundles, compareVersionVitals, compareVitalsTrend, computeStatusDiff, consumeProductPurchase, convertRegionPrices, createAuditEntry, createDeviceTier, createEnterpriseApp, createExternalTransaction, createGrant, createInAppProduct, createOffer, createOneTimeOffer, createOneTimeProduct, createRecoveryAction, createSpinner, createSubscription, createTrack, deactivateBasePlan, deactivateOffer, decodeNotification, deferSubscriptionPurchase, deferSubscriptionV2, deleteBasePlan, deleteGrant, deleteImage, deleteInAppProduct, deleteListing, deleteOffer, deleteOneTimeOffer, deleteOneTimeProduct, deleteSubscription, deployRecoveryAction, detectFastlane, detectOutputFormat, diffListings, diffListingsCommand, diffListingsEnhanced, diffOneTimeProduct, diffReleases, diffSubscription, discoverPlugins, downloadGeneratedApk, downloadReport, exportImages, exportReviews, fetchChangelog, fetchReleaseNotes, formatChangelogEntry, formatCustomPayload, formatDiscordPayload, formatJunit, formatNotification, formatOutput, formatSlackPayload, formatStatusDiff, formatStatusSummary, formatStatusTable, formatWordDiff, generateMigrationPlan, generateNotesFromGit, getAllScannerNames, getAppInfo, getAppStatus, getCountryAvailability, getDeviceTier, getExternalTransaction, getInAppProduct, getListings, getOffer, getOneTimeOffer, getOneTimeProduct, getOrderDetails, getProductPurchase, getProductPurchaseV2, getQuotaUsage, getReleasesStatus, getReview, getRtdnStatus, getSubscription, getSubscriptionAnalytics, getSubscriptionPurchase, getTrainStatus, getUser, getVitalsAnomalies, getVitalsAnr, getVitalsBattery, getVitalsCrashes, getVitalsErrorCount, getVitalsLmk, getVitalsMemory, getVitalsOverview, getVitalsRendering, getVitalsStartup, importDataSafety, importTestersFromCsv, initAudit, initProject, inviteUser, isFinancialReportType, isStatsReportType, isValidBcp47, isValidReportType, isValidStatsDimension, lintListing, lintListings, lintLocalListings, listAchievements, listAuditEvents, listDeviceTiers, listEvents, listGeneratedApks, listGrants, listImages, listInAppProducts, listLeaderboards, listOffers, listOneTimeOffers, listOneTimeProducts, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, loadPreflightConfig, loadStatusCache, maybePaginate, migratePrices, parseAppfile, parseFastfile, parseGrantArg, parseMonth, pauseTrain, promoteRelease, publish, publishEnterpriseApp, pullListings, pushListings, readListingsFromDir, readReleaseNotesFromDir, redactAuditArgs, redactSensitive, refundExternalTransaction, refundOrder, relativeTime, 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 };
package/dist/index.js CHANGED
@@ -7,6 +7,9 @@ var GpcError = class extends Error {
7
7
  this.suggestion = suggestion;
8
8
  this.name = "GpcError";
9
9
  }
10
+ code;
11
+ exitCode;
12
+ suggestion;
10
13
  toJSON() {
11
14
  return {
12
15
  success: false,
@@ -30,6 +33,7 @@ var ApiError = class extends GpcError {
30
33
  this.statusCode = statusCode;
31
34
  this.name = "ApiError";
32
35
  }
36
+ statusCode;
33
37
  };
34
38
  var NetworkError = class extends GpcError {
35
39
  constructor(message, suggestion) {
@@ -1666,7 +1670,7 @@ var ALL_IMAGE_TYPES = [
1666
1670
  "tvBanner"
1667
1671
  ];
1668
1672
  async function exportImages(client, packageName, dir, options) {
1669
- const { mkdir: mkdir8, writeFile: writeFile10 } = await import("fs/promises");
1673
+ const { mkdir: mkdir8, writeFile: writeFile9 } = await import("fs/promises");
1670
1674
  const { join: join12 } = await import("path");
1671
1675
  const edit = await client.edits.insert(packageName);
1672
1676
  try {
@@ -1711,7 +1715,7 @@ async function exportImages(client, packageName, dir, options) {
1711
1715
  }
1712
1716
  const buffer = Buffer.from(await response.arrayBuffer());
1713
1717
  const filePath = join12(dirPath, `${task.index}.png`);
1714
- await writeFile10(filePath, buffer);
1718
+ await writeFile9(filePath, buffer);
1715
1719
  return buffer.length;
1716
1720
  })
1717
1721
  );
@@ -2997,6 +3001,10 @@ async function getVitalsLmk(reporting, packageName, options) {
2997
3001
  aggregation: "DAILY"
2998
3002
  });
2999
3003
  }
3004
+ async function getVitalsErrorCount(reporting, packageName, options) {
3005
+ const opts = options?.dimension ? options : { ...options, dimension: "reportType" };
3006
+ return queryMetric(reporting, packageName, "errorCountMetricSet", opts);
3007
+ }
3000
3008
  async function getVitalsAnomalies(reporting, packageName) {
3001
3009
  return reporting.getAnomalies(packageName);
3002
3010
  }
@@ -3795,18 +3803,10 @@ async function addRecoveryTargeting(client, packageName, actionId, targeting) {
3795
3803
  }
3796
3804
 
3797
3805
  // src/commands/data-safety.ts
3798
- import { readFile as readFile6, writeFile as writeFile3 } from "fs/promises";
3799
- async function getDataSafety(client, packageName) {
3800
- return client.dataSafety.get(packageName);
3801
- }
3806
+ import { readFile as readFile6 } from "fs/promises";
3802
3807
  async function updateDataSafety(client, packageName, data) {
3803
3808
  return client.dataSafety.update(packageName, data);
3804
3809
  }
3805
- async function exportDataSafety(client, packageName, outputPath) {
3806
- const dataSafety = await getDataSafety(client, packageName);
3807
- await writeFile3(outputPath, JSON.stringify(dataSafety, null, 2) + "\n", "utf-8");
3808
- return dataSafety;
3809
- }
3810
3810
  async function importDataSafety(client, packageName, filePath) {
3811
3811
  const content = await readFile6(filePath, "utf-8");
3812
3812
  let data;
@@ -4112,7 +4112,7 @@ function createSpinner(message) {
4112
4112
  }
4113
4113
 
4114
4114
  // src/utils/train-state.ts
4115
- import { mkdir as mkdir3, readFile as readFile7, writeFile as writeFile4 } from "fs/promises";
4115
+ import { mkdir as mkdir3, readFile as readFile7, writeFile as writeFile3 } from "fs/promises";
4116
4116
  import { dirname, join as join5 } from "path";
4117
4117
  import { getCacheDir } from "@gpc-cli/config";
4118
4118
  function stateFile(packageName) {
@@ -4131,7 +4131,7 @@ async function writeTrainState(packageName, state) {
4131
4131
  const path = stateFile(packageName);
4132
4132
  const dir = dirname(path);
4133
4133
  await mkdir3(dir, { recursive: true });
4134
- await writeFile4(path, JSON.stringify(state, null, 2), "utf-8");
4134
+ await writeFile3(path, JSON.stringify(state, null, 2), "utf-8");
4135
4135
  }
4136
4136
  async function clearTrainState(packageName) {
4137
4137
  const { unlink } = await import("fs/promises");
@@ -4301,7 +4301,7 @@ async function publishEnterpriseApp(client, params) {
4301
4301
  }
4302
4302
 
4303
4303
  // src/audit.ts
4304
- import { appendFile, chmod, mkdir as mkdir4, readFile as readFile8, writeFile as writeFile5 } from "fs/promises";
4304
+ import { appendFile, chmod, mkdir as mkdir4, readFile as readFile8, writeFile as writeFile4 } from "fs/promises";
4305
4305
  import { join as join6 } from "path";
4306
4306
  var auditDir = null;
4307
4307
  function initAudit(configDir) {
@@ -4415,7 +4415,7 @@ async function clearAuditLog(options) {
4415
4415
  if (!options?.before) {
4416
4416
  const count = lines.length;
4417
4417
  if (!options?.dryRun) {
4418
- await writeFile5(logPath, "", { encoding: "utf-8", mode: 384 });
4418
+ await writeFile4(logPath, "", { encoding: "utf-8", mode: 384 });
4419
4419
  }
4420
4420
  return { deleted: count, remaining: 0 };
4421
4421
  }
@@ -4435,7 +4435,7 @@ async function clearAuditLog(options) {
4435
4435
  }
4436
4436
  }
4437
4437
  if (!options?.dryRun) {
4438
- await writeFile5(logPath, keep.length > 0 ? keep.join("\n") + "\n" : "", {
4438
+ await writeFile4(logPath, keep.length > 0 ? keep.join("\n") + "\n" : "", {
4439
4439
  encoding: "utf-8",
4440
4440
  mode: 384
4441
4441
  });
@@ -4495,7 +4495,7 @@ function safePathWithin(userPath, baseDir) {
4495
4495
  }
4496
4496
 
4497
4497
  // src/commands/init.ts
4498
- import { mkdir as mkdir5, writeFile as writeFile6, stat as stat7 } from "fs/promises";
4498
+ import { mkdir as mkdir5, writeFile as writeFile5, stat as stat7 } from "fs/promises";
4499
4499
  import { join as join7 } from "path";
4500
4500
  async function exists2(path) {
4501
4501
  try {
@@ -4514,7 +4514,7 @@ async function safeWrite(filePath, content, created, skipped, skipExisting) {
4514
4514
  }
4515
4515
  const dir = filePath.substring(0, filePath.lastIndexOf("/"));
4516
4516
  await mkdir5(dir, { recursive: true });
4517
- await writeFile6(filePath, content, "utf-8");
4517
+ await writeFile5(filePath, content, "utf-8");
4518
4518
  created.push(filePath);
4519
4519
  }
4520
4520
  async function initProject(options) {
@@ -6337,7 +6337,7 @@ function sortResults(items, sortSpec) {
6337
6337
  }
6338
6338
 
6339
6339
  // src/commands/plugin-scaffold.ts
6340
- import { mkdir as mkdir6, writeFile as writeFile7 } from "fs/promises";
6340
+ import { mkdir as mkdir6, writeFile as writeFile6 } from "fs/promises";
6341
6341
  import { join as join10 } from "path";
6342
6342
  async function scaffoldPlugin(options) {
6343
6343
  const { name, dir, description = `GPC plugin: ${name}` } = options;
@@ -6380,7 +6380,7 @@ async function scaffoldPlugin(options) {
6380
6380
  vitest: "^3.0.0"
6381
6381
  }
6382
6382
  };
6383
- await writeFile7(join10(dir, "package.json"), JSON.stringify(pkg, null, 2) + "\n");
6383
+ await writeFile6(join10(dir, "package.json"), JSON.stringify(pkg, null, 2) + "\n");
6384
6384
  files.push("package.json");
6385
6385
  const tsconfig = {
6386
6386
  compilerOptions: {
@@ -6396,7 +6396,7 @@ async function scaffoldPlugin(options) {
6396
6396
  },
6397
6397
  include: ["src"]
6398
6398
  };
6399
- await writeFile7(join10(dir, "tsconfig.json"), JSON.stringify(tsconfig, null, 2) + "\n");
6399
+ await writeFile6(join10(dir, "tsconfig.json"), JSON.stringify(tsconfig, null, 2) + "\n");
6400
6400
  files.push("tsconfig.json");
6401
6401
  const srcContent = `import { definePlugin } from "@gpc-cli/plugin-sdk";
6402
6402
  import type { CommandEvent, CommandResult } from "@gpc-cli/plugin-sdk";
@@ -6429,7 +6429,7 @@ export const plugin = definePlugin({
6429
6429
  },
6430
6430
  });
6431
6431
  `;
6432
- await writeFile7(join10(srcDir, "index.ts"), srcContent);
6432
+ await writeFile6(join10(srcDir, "index.ts"), srcContent);
6433
6433
  files.push("src/index.ts");
6434
6434
  const testContent = `import { describe, it, expect, vi } from "vitest";
6435
6435
  import { plugin } from "../src/index";
@@ -6454,7 +6454,7 @@ describe("${pluginName}", () => {
6454
6454
  });
6455
6455
  });
6456
6456
  `;
6457
- await writeFile7(join10(testDir, "plugin.test.ts"), testContent);
6457
+ await writeFile6(join10(testDir, "plugin.test.ts"), testContent);
6458
6458
  files.push("tests/plugin.test.ts");
6459
6459
  return { dir, files };
6460
6460
  }
@@ -6604,7 +6604,7 @@ function detectFileType(filePath) {
6604
6604
  }
6605
6605
 
6606
6606
  // src/commands/generated-apks.ts
6607
- import { writeFile as writeFile8 } from "fs/promises";
6607
+ import { writeFile as writeFile7 } from "fs/promises";
6608
6608
  async function listGeneratedApks(client, packageName, versionCode) {
6609
6609
  if (!Number.isInteger(versionCode) || versionCode <= 0) {
6610
6610
  throw new GpcError(
@@ -6635,7 +6635,7 @@ async function downloadGeneratedApk(client, packageName, versionCode, apkId, out
6635
6635
  }
6636
6636
  const buffer = await client.generatedApks.download(packageName, versionCode, apkId);
6637
6637
  const bytes = new Uint8Array(buffer);
6638
- await writeFile8(outputPath, bytes);
6638
+ await writeFile7(outputPath, bytes);
6639
6639
  return { path: outputPath, sizeBytes: bytes.byteLength };
6640
6640
  }
6641
6641
 
@@ -6835,7 +6835,7 @@ async function checkBundleSize(analysis, configPath = ".bundlesize.json") {
6835
6835
  }
6836
6836
 
6837
6837
  // src/commands/status.ts
6838
- import { mkdir as mkdir7, readFile as readFile15, writeFile as writeFile9 } from "fs/promises";
6838
+ import { mkdir as mkdir7, readFile as readFile15, writeFile as writeFile8 } from "fs/promises";
6839
6839
  import { execFile as execFile2 } from "child_process";
6840
6840
  import { join as join11 } from "path";
6841
6841
  import { getCacheDir as getCacheDir2 } from "@gpc-cli/config";
@@ -6864,7 +6864,7 @@ async function saveStatusCache(packageName, data, ttlSeconds = DEFAULT_TTL_SECON
6864
6864
  const dir = getCacheDir2();
6865
6865
  await mkdir7(dir, { recursive: true });
6866
6866
  const entry = { fetchedAt: data.fetchedAt, ttl: ttlSeconds, data };
6867
- await writeFile9(cacheFilePath(packageName), JSON.stringify(entry, null, 2), {
6867
+ await writeFile8(cacheFilePath(packageName), JSON.stringify(entry, null, 2), {
6868
6868
  encoding: "utf-8",
6869
6869
  mode: 384
6870
6870
  });
@@ -7267,7 +7267,7 @@ async function trackBreachState(packageName, isBreaching) {
7267
7267
  if (prevBreaching !== isBreaching) {
7268
7268
  try {
7269
7269
  await mkdir7(getCacheDir2(), { recursive: true });
7270
- await writeFile9(
7270
+ await writeFile8(
7271
7271
  filePath,
7272
7272
  JSON.stringify({ breaching: isBreaching, since: (/* @__PURE__ */ new Date()).toISOString() }, null, 2),
7273
7273
  { encoding: "utf-8", mode: 384 }
@@ -7523,7 +7523,6 @@ export {
7523
7523
  discoverPlugins,
7524
7524
  downloadGeneratedApk,
7525
7525
  downloadReport,
7526
- exportDataSafety,
7527
7526
  exportImages,
7528
7527
  exportReviews,
7529
7528
  fetchChangelog,
@@ -7545,7 +7544,6 @@ export {
7545
7544
  getAppInfo,
7546
7545
  getAppStatus,
7547
7546
  getCountryAvailability,
7548
- getDataSafety,
7549
7547
  getDeviceTier,
7550
7548
  getExternalTransaction,
7551
7549
  getInAppProduct,
@@ -7569,6 +7567,7 @@ export {
7569
7567
  getVitalsAnr,
7570
7568
  getVitalsBattery,
7571
7569
  getVitalsCrashes,
7570
+ getVitalsErrorCount,
7572
7571
  getVitalsLmk,
7573
7572
  getVitalsMemory,
7574
7573
  getVitalsOverview,