UNPKG

shipthis

Version:

ShipThis manages building and uploading your Godot games to the App Store and Google Play.

89 lines (86 loc) 2.81 kB
import { jsxs, jsx } from 'react/jsx-runtime'; import { Flags } from '@oclif/core'; import { render } from 'ink'; import 'node:fs'; import 'axios'; import 'crypto-js'; import 'uuid'; import { C as CredentialsType, P as Platform } from '../../../../baseCommand-CTn3KGH3.js'; import 'luxon'; import 'node:path'; import 'chalk'; import 'node:crypto'; import 'node:readline'; import 'node:url'; import 'readline-sync'; import 'isomorphic-git'; import '@tanstack/react-query'; import 'react'; import { n as fetchKeyTestResult, o as niceError, K as KeyTestStatus } from '../../../../baseGameCommand-8VL7xe-O.js'; import 'fast-glob'; import 'yazl'; import 'socket.io-client'; import 'fullscreen-ink'; import 'ink-spinner'; import { T as Table } from '../../../../Table-FaNgpyeq.js'; import { T as Title } from '../../../../Title-BCQtayg6.js'; import 'string-length'; import 'strip-ansi'; import { P as ProjectCredentialsTable } from '../../../../ProjectCredentialsTable-BJJz7W1P.js'; import 'open'; import '@inkjs/ui'; import 'marked'; import 'marked-terminal'; import 'qrcode'; import { C as Command } from '../../../../Command-Cj6F5B5a.js'; import { B as BaseGameAndroidCommand } from '../../../../baseGameAndroidCommand-DRzVMKuG.js'; import '@expo/apple-utils/build/index.js'; import 'deepmerge'; import 'ini'; import 'fs'; import 'path'; import '../../../../useProjectCredentials-TvlolkId.js'; class GameAndroidApiKeyStatus extends BaseGameAndroidCommand { static args = {}; static description = "Displays the status of the Android Service Account API Key for a specific game."; static examples = [ "<%= config.bin %> <%= command.id %>", "<%= config.bin %> <%= command.id %> --gameId 0c179fc4" ]; static flags = { gameId: Flags.string({ char: "g", description: "The ID of the game" }) }; async run() { const game = await this.getGame(); const testResult = await fetchKeyTestResult({ projectId: game.id }); render( /* @__PURE__ */ jsxs(Command, { command: this, children: [ /* @__PURE__ */ jsx( ProjectCredentialsTable, { credentialTypeName: "Android Service Account API Key", queryProps: { platform: Platform.ANDROID, projectId: game.id, type: CredentialsType.KEY } } ), /* @__PURE__ */ jsx(Title, { children: "Android Service Account API Key Test Result" }), /* @__PURE__ */ jsx( Table, { data: [ { "Key Works?": testResult.status === KeyTestStatus.SUCCESS, ...testResult, error: niceError(testResult.error) } ] } ) ] }) ); } } export { GameAndroidApiKeyStatus as default };