shipthis
Version:
ShipThis manages building and uploading your Godot games to the App Store and Google Play.
79 lines (76 loc) • 2.72 kB
JavaScript
import { jsx } from 'react/jsx-runtime';
import { Flags } from '@oclif/core';
import { render } from 'ink';
import { Q as getGoogleStatus, X as disconnectGoogle } from '../../../../index-BwnzoldS.js';
import 'ink-spinner';
import 'node:crypto';
import 'node:fs';
import 'node:path';
import 'node:readline';
import 'node:url';
import 'readline-sync';
import 'luxon';
import 'axios';
import 'isomorphic-git';
import '@tanstack/react-query';
import 'react';
import 'fast-glob';
import 'uuid';
import 'yazl';
import 'socket.io-client';
import 'fullscreen-ink';
import 'string-length';
import 'strip-ansi';
import 'open';
import { C as ConnectGoogle } from '../../../../index-DlE_SPt3.js';
import '../../../../index-hoHfGrjg.js';
import '@inkjs/ui';
import '../../../../ejs-DirFZbza.js';
import 'marked';
import 'marked-terminal';
import 'qrcode';
import { C as CommandGame } from '../../../../CommandGame-D2NqytWc.js';
import { B as BaseGameAndroidCommand } from '../../../../baseGameAndroidCommand-BCB1SMCf.js';
import 'crypto-js';
import '@expo/apple-utils/build/index.js';
import 'deepmerge';
import 'ini';
import '../../../../useGoogleStatus-Cx_QIsXa.js';
import '../../../../useAndroidServiceAccountTestResult-CwKeW0ED.js';
import '../../../../useWebSocket-cM5yOcDv.js';
import '../../../../index-CJWMt1s-.js';
import 'fs';
import 'path';
import '../../../../Command-DN1j3tjt.js';
class GameAndroidApiKeyConnect extends BaseGameAndroidCommand {
static args = {};
static description = "Connects ShipThis with Google for managing Service Account API Keys for an Android game";
static examples = [
"<%= config.bin %> <%= command.id %>",
"<%= config.bin %> <%= command.id %> --force",
"<%= config.bin %> <%= command.id %> --disconnect"
];
static flags = {
...BaseGameAndroidCommand.flags,
disconnect: Flags.boolean({ char: "d" }),
force: Flags.boolean({ char: "f" })
};
async run() {
const googleStatus = await getGoogleStatus();
if (this.flags.disconnect) {
if (!googleStatus.isAuthenticated && !this.flags.force) {
throw new Error("You are not authenticated with Google. Use --force to disconnect anyway.");
}
await disconnectGoogle();
this.log("Disconnected from Google.");
return;
}
if (googleStatus.isAuthenticated && !this.flags.force) {
throw new Error("You are already authenticated with Google. Use --force to re-authenticate.");
}
render(
/* @__PURE__ */ jsx(CommandGame, { command: this, children: /* @__PURE__ */ jsx(ConnectGoogle, { helpPage: !this.flags.force, onComplete: () => process.exit(0), onError: (e) => this.error(e) }) })
);
}
}
export { GameAndroidApiKeyConnect as default };