UNPKG

shipthis

Version:

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

86 lines (83 loc) 2.41 kB
import { jsx } from 'react/jsx-runtime'; import { Args, Flags } from '@oclif/core'; import { render } from 'ink'; import { B as BaseAuthenticatedCommand, $ as revokeAPIKey } from '../../index-BwnzoldS.js'; import 'ink-spinner'; import { g as getShortUUID } from '../../index-CJWMt1s-.js'; import 'react'; import '@tanstack/react-query'; import 'axios'; import 'luxon'; import 'node:fs'; import 'fast-glob'; import 'uuid'; import 'yazl'; import 'socket.io-client'; import 'fullscreen-ink'; import 'string-length'; import 'strip-ansi'; import 'open'; import '@inkjs/ui'; import 'node:path'; import '../../ejs-DirFZbza.js'; import 'marked'; import 'marked-terminal'; import 'qrcode'; import { R as RunWithSpinner } from '../../RunWithSpinner-DucRnFp6.js'; import '../../index-hoHfGrjg.js'; import { C as Command } from '../../Command-DN1j3tjt.js'; import 'crypto-js'; import '@expo/apple-utils/build/index.js'; import 'node:crypto'; import 'node:readline'; import 'node:url'; import 'readline-sync'; import 'isomorphic-git'; import 'deepmerge'; import 'ini'; import 'fs'; import 'path'; import '../../useAndroidServiceAccountTestResult-CwKeW0ED.js'; class ApiKeyRevoke extends BaseAuthenticatedCommand { static args = { apiKeyId: Args.string({ description: "The ID of the API key to revoke", required: true }) }; static description = "Revokes a specific ShipThis API key."; static examples = [ "<%= config.bin %> <%= command.id %> abcd1234", "<%= config.bin %> <%= command.id %> abcd1234 --quiet" ]; static flags = { quiet: Flags.boolean({ char: "q", default: false, description: "Suppress output except for errors" }) }; async run() { const revokeKey = async () => { const { apiKeyId } = this.args; await revokeAPIKey(apiKeyId); console.log(`Revoked API key with ID: ${getShortUUID(apiKeyId)}`); }; const handleComplete = async () => { process.exit(0); }; if (this.flags.quiet) return await revokeKey(); render( /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx( RunWithSpinner, { executeMethod: revokeKey, msgComplete: "ShipThis API key revoked successfully", msgInProgress: "Revoking ShipThis API key...", onComplete: handleComplete } ) }) ); } } export { ApiKeyRevoke as default };