gigabuddy 0.3.2 → 0.4.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 +23 -2
- package/bin/cli.js +35 -20
- package/index.js +20 -19
- package/package.json +1 -1
- package/src/lib/commands.d.ts +26 -6
package/package.json
CHANGED
package/src/lib/commands.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type UserCredentials } from '@gigabuddy/client-core';
|
|
1
|
+
import { type ResolvedAccount, type UserCredentials } from '@gigabuddy/client-core';
|
|
2
2
|
export declare const PRODUCTION_AUTH_URL = "https://auth.gigabuddy.com";
|
|
3
3
|
export declare const PRODUCTION_API_URL = "https://api.gigabuddy.com";
|
|
4
4
|
export declare const STAGING_AUTH_URL = "https://auth.staging.gigabuddy.com";
|
|
@@ -13,7 +13,12 @@ export declare function resolveEnv(options: {
|
|
|
13
13
|
authUrl?: string;
|
|
14
14
|
apiUrl?: string;
|
|
15
15
|
}): Env;
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Which account a command acts on: an explicit `--account` wins, otherwise the
|
|
18
|
+
* resolved one (env var → repo pin → configured default → 'default').
|
|
19
|
+
*/
|
|
20
|
+
export declare function activeAccount(explicit?: string): ResolvedAccount;
|
|
21
|
+
export declare function signIn(env: Env, account?: string): Promise<UserCredentials>;
|
|
17
22
|
/**
|
|
18
23
|
* `gigabuddy login` — sign in AND set npm up, because for this client they are
|
|
19
24
|
* one act. Installing `@gigabuddy` packages is what the CLI is for: nothing
|
|
@@ -30,6 +35,7 @@ export declare function signIn(env: Env): Promise<UserCredentials>;
|
|
|
30
35
|
*/
|
|
31
36
|
export declare function loginCommand(env: Env, options?: {
|
|
32
37
|
npm?: boolean;
|
|
38
|
+
account?: string;
|
|
33
39
|
}): Promise<void>;
|
|
34
40
|
/**
|
|
35
41
|
* `gigabuddy login --npm` — make `npm install @gigabuddy/…` work as you.
|
|
@@ -39,9 +45,9 @@ export declare function loginCommand(env: Env, options?: {
|
|
|
39
45
|
* can install is still decided per install, against your own access; this only
|
|
40
46
|
* proves who you are.
|
|
41
47
|
*/
|
|
42
|
-
export declare function npmLoginCommand(env: Env): Promise<void>;
|
|
43
|
-
export declare function npmLogoutCommand(env: Env): void;
|
|
44
|
-
export declare function logoutCommand(env: Env): Promise<void>;
|
|
48
|
+
export declare function npmLoginCommand(env: Env, account?: string): Promise<void>;
|
|
49
|
+
export declare function npmLogoutCommand(env: Env, account?: string): void;
|
|
50
|
+
export declare function logoutCommand(env: Env, account?: string): Promise<void>;
|
|
45
51
|
/**
|
|
46
52
|
* `gigabuddy doctor [package]` — why isn't this working?
|
|
47
53
|
*
|
|
@@ -65,4 +71,18 @@ export interface SetupRunner {
|
|
|
65
71
|
* custodies its own credential; our sign-in is neither needed nor offered here.
|
|
66
72
|
*/
|
|
67
73
|
export declare function setupCommand(runner?: SetupRunner): void;
|
|
68
|
-
export declare function statusCommand(): Promise<void>;
|
|
74
|
+
export declare function statusCommand(account?: string): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* `gigabuddy accounts` — every account on this machine, who each is signed in
|
|
77
|
+
* as, and which one is active right here (and why).
|
|
78
|
+
*/
|
|
79
|
+
export declare function accountsCommand(): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* `gigabuddy use <name>` — pin the enclosing repository to an account, so every
|
|
82
|
+
* client of client-core resolves it there from now on. `--default` sets the
|
|
83
|
+
* machine-wide fallback instead; `--unpin` removes this repo's pin.
|
|
84
|
+
*/
|
|
85
|
+
export declare function useCommand(name: string | undefined, options?: {
|
|
86
|
+
default?: boolean;
|
|
87
|
+
unpin?: boolean;
|
|
88
|
+
}, cwd?: string): void;
|