@yoonion/mimi-seed-mcp 0.3.18 → 0.3.19

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.
@@ -0,0 +1,8 @@
1
+ import { ensureFreshAccessToken } from './auth/google-auth.js';
2
+ export { ensureFreshAccessToken };
3
+ export declare function requireAuth(): import("google-auth-library").OAuth2Client;
4
+ export declare const PLAY_AUTH_HINT: string;
5
+ export declare const APPSTORE_AUTH_HINT: string;
6
+ export declare function requirePlayStoreAuth(packageName?: string): import("google-auth-library").JWT;
7
+ export declare function requireServiceAccountJson(packageName?: string): string;
8
+ export declare function requireAppStoreCreds(): import("./appstore/auth.js").AppStoreCredentials;
@@ -0,0 +1,58 @@
1
+ import { getAuthenticatedClient, ensureFreshAccessToken } from './auth/google-auth.js';
2
+ import { getServiceAccountClient, getServiceAccountJson } from './auth/playstore-auth.js';
3
+ import { getAppStoreCredentials } from './appstore/auth.js';
4
+ export { ensureFreshAccessToken };
5
+ export function requireAuth() {
6
+ const client = getAuthenticatedClient();
7
+ if (!client) {
8
+ throw new Error([
9
+ '❌ Google 계정이 연결되지 않았어.',
10
+ '',
11
+ '터미널에서 이것만 실행하면 돼:',
12
+ '',
13
+ ' npx -y @yoonion/mimi-seed-mcp mimi-seed-auth',
14
+ '',
15
+ '브라우저가 열리면 Google 로그인 → 끝.',
16
+ '그 다음에 다시 물어봐줘.',
17
+ ].join('\n'));
18
+ }
19
+ return client;
20
+ }
21
+ export const PLAY_AUTH_HINT = [
22
+ '❌ Google Play 서비스 계정이 연결되지 않았어.',
23
+ '',
24
+ '터미널에서 이것만 실행하면 돼:',
25
+ '',
26
+ ' npx -y @yoonion/mimi-seed-mcp mimi-seed-playstore-auth',
27
+ '',
28
+ '서비스 계정 JSON 파일 경로를 입력하면 저장 완료.',
29
+ '그 다음에 다시 물어봐줘.',
30
+ ].join('\n');
31
+ export const APPSTORE_AUTH_HINT = [
32
+ '❌ App Store Connect 인증이 설정되지 않았어.',
33
+ '',
34
+ '터미널에서 이것만 실행하면 돼:',
35
+ '',
36
+ ' npx -y @yoonion/mimi-seed-mcp mimi-seed-appstore-auth',
37
+ '',
38
+ 'Issuer ID, Key ID, .p8 파일 경로를 입력하면 저장 완료.',
39
+ '그 다음에 다시 물어봐줘.',
40
+ ].join('\n');
41
+ export function requirePlayStoreAuth(packageName) {
42
+ const client = getServiceAccountClient(packageName);
43
+ if (!client)
44
+ throw new Error(PLAY_AUTH_HINT);
45
+ return client;
46
+ }
47
+ export function requireServiceAccountJson(packageName) {
48
+ const json = getServiceAccountJson(packageName);
49
+ if (!json)
50
+ throw new Error(PLAY_AUTH_HINT);
51
+ return json;
52
+ }
53
+ export function requireAppStoreCreds() {
54
+ const creds = getAppStoreCredentials();
55
+ if (!creds)
56
+ throw new Error(APPSTORE_AUTH_HINT);
57
+ return creds;
58
+ }