naro-cli 0.2.1 → 0.3.0
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.
- package/README.md +112 -4
- package/dist/artifact-types.d.ts +3 -0
- package/dist/{chunk-IC4R5EYE.js → chunk-B6F7QIW7.js} +1336 -402
- package/dist/deploy.d.ts +39 -26
- package/dist/deploy.js +4 -10
- package/dist/index.js +1235 -64
- package/package.json +3 -2
- package/dist/callback-server.d.ts +0 -10
- package/dist/index.d.ts +0 -7
- package/dist/login.d.ts +0 -10
- package/dist/session.d.ts +0 -16
- package/dist/supabase-auth.d.ts +0 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "naro-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"naro": "./dist/index.js"
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
"typescript": "7.0.2",
|
|
30
30
|
"vitest": "3.2.7",
|
|
31
31
|
"@next-deploy/build": "0.1.0",
|
|
32
|
+
"@next-deploy/config": "0.1.0",
|
|
32
33
|
"@next-deploy/core": "0.1.0",
|
|
33
|
-
"@next-deploy/
|
|
34
|
+
"@next-deploy/sdk": "0.1.0"
|
|
34
35
|
},
|
|
35
36
|
"scripts": {
|
|
36
37
|
"build": "tsup && pnpm build:types",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface CallbackServer {
|
|
2
|
-
port: number;
|
|
3
|
-
waitForCode(timeoutMs: number): Promise<string>;
|
|
4
|
-
close(): void;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Starts a localhost HTTP callback server for OAuth redirects.
|
|
8
|
-
* The server resolves exactly one callback via `waitForCode()` — call it once per server.
|
|
9
|
-
*/
|
|
10
|
-
export declare function startCallbackServer(): Promise<CallbackServer>;
|
package/dist/index.d.ts
DELETED
package/dist/login.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type StoredSession } from "./session";
|
|
2
|
-
export interface CliIo {
|
|
3
|
-
out(msg: string): void;
|
|
4
|
-
err(msg: string): void;
|
|
5
|
-
}
|
|
6
|
-
export declare const stdio: CliIo;
|
|
7
|
-
export declare function openBrowser(url: string): void;
|
|
8
|
-
export declare function runLogin(io?: CliIo): Promise<void>;
|
|
9
|
-
export declare function runWhoami(io?: CliIo, home?: string, refresh?: (refreshToken: string) => Promise<StoredSession>): Promise<void>;
|
|
10
|
-
export declare function runLogout(io?: CliIo, home?: string, signOut?: (session: StoredSession) => Promise<void>): Promise<void>;
|
package/dist/session.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface StoredSession {
|
|
2
|
-
access_token: string;
|
|
3
|
-
refresh_token: string;
|
|
4
|
-
expires_at: number;
|
|
5
|
-
user: {
|
|
6
|
-
id: string;
|
|
7
|
-
email: string | null;
|
|
8
|
-
github: string | null;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export declare function credentialsDir(home?: string): string;
|
|
12
|
-
export declare function credentialsFile(home?: string): string;
|
|
13
|
-
export declare function saveSession(session: StoredSession, home?: string): void;
|
|
14
|
-
export declare function loadStoredSession(home?: string): StoredSession | null;
|
|
15
|
-
export declare function clearSession(home?: string): void;
|
|
16
|
-
export declare function isExpired(session: StoredSession, skewSeconds?: number): boolean;
|
package/dist/supabase-auth.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type Session, type SupabaseClient } from "@supabase/supabase-js";
|
|
2
|
-
import type { StoredSession } from "./session";
|
|
3
|
-
export declare function createAuthClient(env?: NodeJS.ProcessEnv): SupabaseClient;
|
|
4
|
-
export declare function toStoredSession(session: Session): StoredSession;
|
|
5
|
-
export declare function refreshStoredSession(refreshToken: string, client?: SupabaseClient): Promise<StoredSession>;
|
|
6
|
-
export interface LoginDeps {
|
|
7
|
-
openBrowser: (url: string) => void;
|
|
8
|
-
client?: SupabaseClient;
|
|
9
|
-
timeoutMs?: number;
|
|
10
|
-
}
|
|
11
|
-
export declare function login(deps: LoginDeps): Promise<StoredSession>;
|