UNPKG

shipthis

Version:

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

71 lines (68 loc) 2.36 kB
import { 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 { P as Platform, C as CredentialsType } from '../../../../baseCommand-CTn3KGH3.js'; import 'luxon'; import { a as getProjectCredentials } from '../../../../index-BW7z-5sB.js'; 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 'fast-glob'; import 'yazl'; import 'socket.io-client'; import 'fullscreen-ink'; import 'ink-spinner'; import 'string-length'; import 'strip-ansi'; import 'open'; import '@inkjs/ui'; import '../../../../baseGameCommand-8VL7xe-O.js'; import 'marked'; import 'marked-terminal'; import 'qrcode'; import { C as CreateKeystore } from '../../../../Create-pfGYcKu4.js'; import { C as CommandGame } from '../../../../CommandGame-CuvuH-z6.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 '../../../../RunWithSpinner-DucRnFp6.js'; import '../../../../Command-Cj6F5B5a.js'; class GameAndroidKeyStoreCreate extends BaseGameAndroidCommand { static args = {}; static description = "Creates a new Android Keystore for a game"; static examples = [ "<%= config.bin %> <%= command.id %>", "<%= config.bin %> <%= command.id %> --gameId 0c179fc4" ]; static flags = { ...BaseGameAndroidCommand.flags, force: Flags.boolean({ char: "f" }) }; async run() { const game = await this.getGame(); const projectCredentials = await getProjectCredentials(game.id); const hasKeystore = projectCredentials.some( (cred) => cred.platform === Platform.ANDROID && cred.isActive && cred.type === CredentialsType.CERTIFICATE ); if (hasKeystore && !this.flags.force) { this.error("A Keystore is already set on this game. Use --force to overwrite it."); } render( /* @__PURE__ */ jsx(CommandGame, { command: this, children: /* @__PURE__ */ jsx(CreateKeystore, { onComplete: () => process.exit(0), onError: (e) => this.error(e) }) }) ); } } export { GameAndroidKeyStoreCreate as default };