pinecall 0.3.0 → 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/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +43 -12
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/env.d.ts +22 -6
- package/dist/cli/env.d.ts.map +1 -1
- package/dist/cli/env.js +56 -14
- package/dist/cli/env.js.map +1 -1
- package/dist/cli/gateway.d.ts +12 -0
- package/dist/cli/gateway.d.ts.map +1 -0
- package/dist/cli/gateway.js +67 -0
- package/dist/cli/gateway.js.map +1 -0
- package/dist/cli/index.js +6 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/login.d.ts +1 -1
- package/dist/cli/login.d.ts.map +1 -1
- package/dist/cli/login.js +87 -10
- package/dist/cli/login.js.map +1 -1
- package/dist/cli/profiles.d.ts +57 -5
- package/dist/cli/profiles.d.ts.map +1 -1
- package/dist/cli/profiles.js +111 -9
- package/dist/cli/profiles.js.map +1 -1
- package/dist/cli/ui/console/assets/index-DhcpHPdk.js +102 -0
- package/dist/cli/ui/console/assets/index-iylvEP0_.css +1 -0
- package/dist/cli/ui/console/favicon.png +0 -0
- package/dist/cli/ui/console/index.html +4 -4
- package/dist/cli/ui/console/pinecall-logo.png +0 -0
- package/dist/cli/ui/console/pinecall-mark.png +0 -0
- package/dist/cli/world.d.ts.map +1 -1
- package/dist/cli/world.js +2 -1
- package/dist/cli/world.js.map +1 -1
- package/package.json +2 -2
- package/dist/cli/signup.d.ts +0 -25
- package/dist/cli/signup.d.ts.map +0 -1
- package/dist/cli/signup.js +0 -122
- package/dist/cli/signup.js.map +0 -1
- package/dist/cli/ui/admin/assets/index-BlHXSYVz.css +0 -1
- package/dist/cli/ui/admin/assets/index-BpdIOuyO.js +0 -58
- package/dist/cli/ui/admin/index.html +0 -20
- package/dist/cli/ui/browser.d.ts +0 -10
- package/dist/cli/ui/browser.d.ts.map +0 -1
- package/dist/cli/ui/browser.js +0 -30
- package/dist/cli/ui/browser.js.map +0 -1
- package/dist/cli/ui/console/assets/index-BUlGAwqn.css +0 -1
- package/dist/cli/ui/console/assets/index-D9StTnoH.js +0 -102
- package/dist/cli/ui/index.d.ts +0 -15
- package/dist/cli/ui/index.d.ts.map +0 -1
- package/dist/cli/ui/index.js +0 -117
- package/dist/cli/ui/index.js.map +0 -1
- package/dist/cli/ui/refused.d.ts +0 -8
- package/dist/cli/ui/refused.d.ts.map +0 -1
- package/dist/cli/ui/refused.js +0 -11
- package/dist/cli/ui/refused.js.map +0 -1
- package/dist/cli/ui/server.d.ts +0 -22
- package/dist/cli/ui/server.d.ts.map +0 -1
- package/dist/cli/ui/server.js +0 -211
- package/dist/cli/ui/server.js.map +0 -1
package/dist/cli/login.js
CHANGED
|
@@ -3,12 +3,12 @@ import { hostname } from "node:os";
|
|
|
3
3
|
import { parseArgs } from "node:util";
|
|
4
4
|
import { openInABrowser } from "./browser.js";
|
|
5
5
|
import { pinecallHome, writeGateway } from "./credentials.js";
|
|
6
|
-
import { nameFor, readConfig, writeProfile } from "./profiles.js";
|
|
6
|
+
import { activate, chosenGateway, nameFor, nameForOrg, readConfig, writeProfile } from "./profiles.js";
|
|
7
7
|
import { CLOUD_URL } from "./env.js";
|
|
8
8
|
import { aLineOfStdin } from "./secret.js";
|
|
9
9
|
import { asked } from "./testing/gateway.js";
|
|
10
10
|
import { orgOf, refusal, whoIs } from "./whoami.js";
|
|
11
|
-
const USAGE = "usage: pinecall login [gateway-url] [--key-stdin]";
|
|
11
|
+
const USAGE = "usage: pinecall login [gateway-url] [--as <profile>] [--key-stdin]";
|
|
12
12
|
// How often the terminal asks, and for how long. The gateway's word lives ten minutes, so this
|
|
13
13
|
// gives up a little after it does rather than polling a word that cannot come back.
|
|
14
14
|
const EVERY_MS = 2_000;
|
|
@@ -23,10 +23,14 @@ export const group = {
|
|
|
23
23
|
it is revoked on its own from the Keys screen. Nothing types a password into a shell, and the
|
|
24
24
|
day your org signs in with Google this verb does not change.
|
|
25
25
|
|
|
26
|
-
With no URL it is
|
|
26
|
+
With no URL it is the gateway this machine is pointed at — ${CLOUD_URL} until \`pinecall gateway
|
|
27
|
+
<url>\` says otherwise — and it says which one out loud before anything is kept.
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
One login keeps everything you hold: a profile per org you belong to, named after the org,
|
|
30
|
+
each with your key in BOTH worlds. The sandbox one is in hand, so \`pinecall run\` and \`pinecall
|
|
31
|
+
chat\` answer in a world of your own and never in the one your customers call; \`pinecall use
|
|
32
|
+
<org>\` moves between orgs and \`pinecall use <org> production\` looks at production. --as keeps
|
|
33
|
+
ONE profile under a name of yours instead.
|
|
30
34
|
|
|
31
35
|
--key-stdin reads a KEY from one line of stdin instead, for a machine: a server, a CI job, a
|
|
32
36
|
container. That is what \`pinecall keys issue\` mints, and it writes the same profile — so a
|
|
@@ -44,7 +48,7 @@ export async function login(argv, how = {}) {
|
|
|
44
48
|
allowPositionals: true,
|
|
45
49
|
options: { "key-stdin": { type: "boolean", default: false }, as: { type: "string" } },
|
|
46
50
|
});
|
|
47
|
-
const { url, assumed } = theGateway(positionals[0]);
|
|
51
|
+
const { url, assumed } = theGateway(positionals[0], pinecallHome(how.env ?? process.env));
|
|
48
52
|
if (assumed !== undefined)
|
|
49
53
|
out.write(`${assumed}\n`);
|
|
50
54
|
const key = values["key-stdin"] === true ? (await aLineOfStdin()).trim() : await throughABrowser(url, how, out, err);
|
|
@@ -73,11 +77,81 @@ export async function login(argv, how = {}) {
|
|
|
73
77
|
// now, and `credentials` is what v1's CLI on this same machine still reads. The second write
|
|
74
78
|
// goes with the second half of this change.
|
|
75
79
|
const name = values.as ?? nameFor(url, readConfig(home));
|
|
76
|
-
|
|
80
|
+
const kept = await everyOrgOfTheirs({ url, apiKey: key }, who, values.as ?? name, values.as !== undefined, home);
|
|
77
81
|
writeGateway(url, { api_key: key, org: orgOf(who) }, home);
|
|
78
|
-
|
|
82
|
+
for (const line of kept)
|
|
83
|
+
out.write(`${line}\n`);
|
|
79
84
|
return 0;
|
|
80
85
|
}
|
|
86
|
+
// What a person held was ONE key: the sandbox of whichever org of theirs was oldest. A second org,
|
|
87
|
+
// or a look at production, meant logging in again with a flag nobody could guess. The gateway
|
|
88
|
+
// mints the rest from the key in hand (POST /v1/login/org, POST /v1/login/env), so the login does
|
|
89
|
+
// it here, once: a profile per org, both worlds in each, and `pinecall use` is the whole of moving.
|
|
90
|
+
/** Every org this key's person belongs to, kept as a profile each, with the keys of both worlds. */
|
|
91
|
+
async function everyOrgOfTheirs(door, who, fallback, named, home) {
|
|
92
|
+
const world = who.env;
|
|
93
|
+
// `--as` names ONE profile, and a machine key names nobody: both keep exactly the key in hand.
|
|
94
|
+
const mine = named ? [] : await theirOrgs(door);
|
|
95
|
+
if (mine.length === 0) {
|
|
96
|
+
const keys = await bothWorlds(door, world);
|
|
97
|
+
writeProfile(fallback, { url: door.url, key: door.apiKey, keys, org: orgOf(who), env: who.env }, home);
|
|
98
|
+
return [`▸ ${fallback} · ${door.url} · org ${orgOf(who)} · ${worldsIn(keys, world)}`];
|
|
99
|
+
}
|
|
100
|
+
const said = [];
|
|
101
|
+
let here;
|
|
102
|
+
for (const org of mine) {
|
|
103
|
+
const key = org.here ? door.apiKey : await inThatOrg(door, org.org);
|
|
104
|
+
if (key === null)
|
|
105
|
+
continue;
|
|
106
|
+
const name = nameForOrg(org.slug ?? org.org, door.url, readConfig(home));
|
|
107
|
+
const keys = await bothWorlds({ url: door.url, apiKey: key }, world);
|
|
108
|
+
writeProfile(name, { url: door.url, key, keys, org: org.slug ?? org.org, env: who.env }, home);
|
|
109
|
+
if (org.here)
|
|
110
|
+
here = name;
|
|
111
|
+
said.push(`${org.here ? "▸" : " "} ${name} · ${door.url} · ${worldsIn(keys, world)}`);
|
|
112
|
+
}
|
|
113
|
+
// The org they signed in to is the one in hand; the rest are a `pinecall use` away.
|
|
114
|
+
if (here !== undefined)
|
|
115
|
+
activate(here, home);
|
|
116
|
+
if (said.length > 1)
|
|
117
|
+
said.push(" `pinecall use <org>` moves between them; `pinecall use <org> production` looks at production");
|
|
118
|
+
return said;
|
|
119
|
+
}
|
|
120
|
+
/** The orgs the person holds a key in, or none for a machine key and for a gateway without the door. */
|
|
121
|
+
async function theirOrgs(door) {
|
|
122
|
+
try {
|
|
123
|
+
return (await asked(door, "/v1/login/orgs", { method: "GET" })).orgs.filter((org) => org.member !== false);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
return [];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** The same person's key in another org of theirs, or null when the gateway would not mint one. */
|
|
130
|
+
async function inThatOrg(door, org) {
|
|
131
|
+
try {
|
|
132
|
+
return (await asked(door, "/v1/login/org", { method: "POST", body: { org } })).key;
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/** This key and its sibling in the other world, when the gateway mints one for this person. */
|
|
139
|
+
async function bothWorlds(door, world) {
|
|
140
|
+
const other = world === "sandbox" ? "production" : "sandbox";
|
|
141
|
+
const keys = { [world]: door.apiKey };
|
|
142
|
+
try {
|
|
143
|
+
keys[other] = (await asked(door, "/v1/login/env", { method: "POST", body: { env: other } })).key;
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
// A machine key opens one world and may not mint the other: the profile holds what there is.
|
|
147
|
+
}
|
|
148
|
+
return keys;
|
|
149
|
+
}
|
|
150
|
+
// The world in hand first and marked, so the line reads as where the next verb goes.
|
|
151
|
+
function worldsIn(keys, inHand) {
|
|
152
|
+
const other = inHand === "sandbox" ? "production" : "sandbox";
|
|
153
|
+
return keys[other] === undefined ? inHand : `${inHand} (and ${other})`;
|
|
154
|
+
}
|
|
81
155
|
/**
|
|
82
156
|
* The dance: a word this terminal asks for, a link the person opens, and the key left behind.
|
|
83
157
|
*
|
|
@@ -110,12 +184,15 @@ async function throughABrowser(url, how, out, err) {
|
|
|
110
184
|
* who meant their own box has to be able to see that this one was assumed, in the line above the
|
|
111
185
|
* link, rather than discovering it in `pinecall whoami` tomorrow.
|
|
112
186
|
*/
|
|
113
|
-
export function theGateway(named) {
|
|
187
|
+
export function theGateway(named, home) {
|
|
114
188
|
if (named !== undefined)
|
|
115
189
|
return { url: named };
|
|
190
|
+
const chosen = chosenGateway(home);
|
|
191
|
+
if (chosen !== undefined)
|
|
192
|
+
return { url: chosen, assumed: `gateway ${chosen} (this machine's, from \`pinecall gateway\`)` };
|
|
116
193
|
return {
|
|
117
194
|
url: CLOUD_URL,
|
|
118
|
-
assumed: `gateway ${CLOUD_URL} (the default — \`pinecall
|
|
195
|
+
assumed: `gateway ${CLOUD_URL} (the default — \`pinecall gateway <url>\` for your own box)`,
|
|
119
196
|
};
|
|
120
197
|
}
|
|
121
198
|
/** Where the person signs this terminal in: the gateway's own page, carrying the word. */
|
package/dist/cli/login.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/cli/login.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAEzG,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/cli/login.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAEzG,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAA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AO,EAAE,CAAC;YACjB,GAAG,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,GAAG,CAAC,KAAK,CAAC,GAAG,aAAa,IAAI,CAAC,CAAC;IAChC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,2FAA2F;AAC3F,SAAS,WAAW;IAClB,IAAI,CAAC;QACH,OAAO,QAAQ,EAAE,CAAC;IACpB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AACrD,CAAC"}
|
package/dist/cli/profiles.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
/** ~/.pinecall/config.json: the gateways this machine knows, by name, and which one is in hand. */
|
|
2
|
-
/**
|
|
2
|
+
/** The two worlds of an org, as a profile names them. */
|
|
3
|
+
export type World = "sandbox" | "production";
|
|
4
|
+
/** The same person's key in each world of one org, as the login minted them. */
|
|
5
|
+
export type Keys = Partial<Record<World, string>>;
|
|
6
|
+
/** One org on one gateway: where it is, the keys that open it, and which world is in hand. */
|
|
3
7
|
export interface Profile {
|
|
4
8
|
url: string;
|
|
9
|
+
/** The key every verb uses: the one of the world `env` names. */
|
|
5
10
|
key: string;
|
|
11
|
+
/** Both worlds' keys, so moving between them is `pinecall use` and never a second login. */
|
|
12
|
+
keys?: Keys;
|
|
6
13
|
/** The org the key belongs to, as `whoami` last said it. A label, never a check. */
|
|
7
14
|
org?: string;
|
|
8
15
|
/** The world it opens, likewise: printed, never trusted over what the gateway says. */
|
|
@@ -10,9 +17,11 @@ export interface Profile {
|
|
|
10
17
|
/** The phone this person calls FROM, so a ring in the sandbox reaches their own agent. */
|
|
11
18
|
calling?: string;
|
|
12
19
|
}
|
|
13
|
-
/** The file: every profile by name,
|
|
20
|
+
/** The file: every profile by name, the one a verb uses when nobody names another, and the gateway this machine was pointed at. */
|
|
14
21
|
export interface Config {
|
|
15
22
|
active?: string;
|
|
23
|
+
/** Where `pinecall login` goes when nobody names a URL: `pinecall gateway <url>` writes it. */
|
|
24
|
+
gateway?: string;
|
|
16
25
|
profiles: Record<string, Profile>;
|
|
17
26
|
}
|
|
18
27
|
/**
|
|
@@ -27,22 +36,65 @@ export interface Config {
|
|
|
27
36
|
*/
|
|
28
37
|
export declare function readConfig(home?: string): Config;
|
|
29
38
|
/**
|
|
30
|
-
* Take `--profile <name>` out of an invocation's argv, and remember
|
|
39
|
+
* Take `--profile <name>` and `--prod` out of an invocation's argv, and remember them.
|
|
31
40
|
*
|
|
32
41
|
* Returns what is left, so the group sees only its own flags. `--profile=<name>` too, because
|
|
33
42
|
* both spellings are what a person types and only one of them working is a footgun.
|
|
34
43
|
*/
|
|
35
44
|
export declare function withoutTheProfileFlag(argv: readonly string[]): string[];
|
|
45
|
+
/** Production when this invocation said `--prod`: one command looks there, and nothing is kept. */
|
|
46
|
+
export declare function theChosenWorld(): World | undefined;
|
|
36
47
|
/** The profile this invocation named, when it named one. */
|
|
37
48
|
export declare function theChosenProfile(): string | undefined;
|
|
38
|
-
/** The
|
|
39
|
-
export
|
|
49
|
+
/** The org a project says it belongs to, and the package.json that says it. */
|
|
50
|
+
export interface ProjectOrg {
|
|
51
|
+
org: string;
|
|
52
|
+
file: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The org the nearest package.json names under `"pinecall": { "org": "<slug>" }`, walking up from
|
|
56
|
+
* `from`. A package.json that names none is passed over, so a package inside a project still
|
|
57
|
+
* belongs to the project's org.
|
|
58
|
+
*
|
|
59
|
+
* Four checkouts of four orgs used to share ONE active profile: a person moved between them with
|
|
60
|
+
* `pinecall use`, and the day they forgot, a verb ran in the org of the last project they were in.
|
|
61
|
+
* The project saying its org is what makes the directory the answer.
|
|
62
|
+
*/
|
|
63
|
+
export declare function projectOrg(from?: string): ProjectOrg | undefined;
|
|
64
|
+
/** Which profile a verb runs on, and the project that decided it when one did. */
|
|
65
|
+
export interface Choice {
|
|
66
|
+
name: string | undefined;
|
|
67
|
+
project?: ProjectOrg;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The profile `--profile` named; else the one of the org this project names, and none at all when
|
|
71
|
+
* this machine holds no profile of it — never the active one, which is another org's; else the
|
|
72
|
+
* active one. Among several profiles of that org, the one that opens the world asked for — the
|
|
73
|
+
* sandbox when none was — because a machine logged in before one login kept both worlds has a
|
|
74
|
+
* profile per world; then the one named after the org, which the login names by its bare slug.
|
|
75
|
+
*/
|
|
76
|
+
export declare function choose(named: string | undefined, config: Config, from?: string, world?: World): Choice;
|
|
77
|
+
/** The profile a verb runs on: the one named, the project's org's, or the active one, or nothing at all. */
|
|
78
|
+
export declare function profileFor(named: string | undefined, home?: string, from?: string): Profile | undefined;
|
|
79
|
+
/** The gateway this machine was pointed at, or nothing — and then it is the cloud's. */
|
|
80
|
+
export declare function chosenGateway(home?: string): string | undefined;
|
|
81
|
+
/** Point this machine at a gateway, so `pinecall login` and every verb with no key go there. */
|
|
82
|
+
export declare function chooseGateway(url: string, home?: string): void;
|
|
40
83
|
/** Which profile is in hand, for a line that says where a verb is about to go. */
|
|
41
84
|
export declare function activeName(home?: string): string | undefined;
|
|
42
85
|
/** Keep one profile and make it the active one: what `pinecall login` does when it has a key. */
|
|
43
86
|
export declare function writeProfile(name: string, profile: Profile, home?: string): void;
|
|
44
87
|
/** Make a profile that is already there the active one. False when there is no such name. */
|
|
45
88
|
export declare function activate(name: string, home?: string): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Move a profile to one of its worlds, with the key the login already minted for it.
|
|
91
|
+
*
|
|
92
|
+
* A person holds a key in each world of an org, and used to hold only the sandbox one: looking at
|
|
93
|
+
* production from a terminal meant a second profile nobody knew how to make.
|
|
94
|
+
*/
|
|
95
|
+
export declare function inWorld(name: string, world: World, home?: string): "moved" | "unknown" | "nokey";
|
|
96
|
+
/** A name for an org's profile: its slug, and the gateway's host beside it when another gateway took the slug. */
|
|
97
|
+
export declare function nameForOrg(slug: string, url: string, config: Config): string;
|
|
46
98
|
/**
|
|
47
99
|
* Forget a gateway. False when there is no such name, so a typo is never silence.
|
|
48
100
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/cli/profiles.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAanG,
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/cli/profiles.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAanG,yDAAyD;AACzD,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,YAAY,CAAC;AAE7C,gFAAgF;AAChF,MAAM,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAElD,8FAA8F;AAC9F,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,4FAA4F;IAC5F,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uFAAuF;IACvF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,mIAAmI;AACnI,MAAM,WAAW,MAAM;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+FAA+F;IAC/F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;;;;;;;;GASG;A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@
|
|
|
1
1
|
/** ~/.pinecall/config.json: the gateways this machine knows, by name, and which one is in hand. */
|
|
2
|
-
import { chmodSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { join } from "node:path";
|
|
2
|
+
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
4
|
import { normalised, pinecallHome, readCredentials } from "./credentials.js";
|
|
5
5
|
// The directory is a person's and the file holds keys: 0700 and 0600, as the old two were.
|
|
6
6
|
const DIRECTORY_MODE = 0o700;
|
|
@@ -48,17 +48,22 @@ function migrated(home) {
|
|
|
48
48
|
// places for it to be missing from. Set once at startup and never again: a parsed argument that
|
|
49
49
|
// happens to live in a module, not state anything changes while a verb runs.
|
|
50
50
|
let chosen;
|
|
51
|
+
let production = false;
|
|
51
52
|
/**
|
|
52
|
-
* Take `--profile <name>` out of an invocation's argv, and remember
|
|
53
|
+
* Take `--profile <name>` and `--prod` out of an invocation's argv, and remember them.
|
|
53
54
|
*
|
|
54
55
|
* Returns what is left, so the group sees only its own flags. `--profile=<name>` too, because
|
|
55
56
|
* both spellings are what a person types and only one of them working is a footgun.
|
|
56
57
|
*/
|
|
57
58
|
export function withoutTheProfileFlag(argv) {
|
|
58
59
|
const rest = [];
|
|
60
|
+
production = false;
|
|
59
61
|
for (let at = 0; at < argv.length; at += 1) {
|
|
60
62
|
const word = argv[at];
|
|
61
|
-
if (word === "--
|
|
63
|
+
if (word === "--prod") {
|
|
64
|
+
production = true;
|
|
65
|
+
}
|
|
66
|
+
else if (word === "--profile") {
|
|
62
67
|
chosen = argv[at + 1];
|
|
63
68
|
at += 1;
|
|
64
69
|
}
|
|
@@ -71,16 +76,84 @@ export function withoutTheProfileFlag(argv) {
|
|
|
71
76
|
}
|
|
72
77
|
return rest;
|
|
73
78
|
}
|
|
79
|
+
/** Production when this invocation said `--prod`: one command looks there, and nothing is kept. */
|
|
80
|
+
export function theChosenWorld() {
|
|
81
|
+
return production ? "production" : undefined;
|
|
82
|
+
}
|
|
74
83
|
/** The profile this invocation named, when it named one. */
|
|
75
84
|
export function theChosenProfile() {
|
|
76
85
|
return chosen;
|
|
77
86
|
}
|
|
78
|
-
/**
|
|
79
|
-
|
|
87
|
+
/**
|
|
88
|
+
* The org the nearest package.json names under `"pinecall": { "org": "<slug>" }`, walking up from
|
|
89
|
+
* `from`. A package.json that names none is passed over, so a package inside a project still
|
|
90
|
+
* belongs to the project's org.
|
|
91
|
+
*
|
|
92
|
+
* Four checkouts of four orgs used to share ONE active profile: a person moved between them with
|
|
93
|
+
* `pinecall use`, and the day they forgot, a verb ran in the org of the last project they were in.
|
|
94
|
+
* The project saying its org is what makes the directory the answer.
|
|
95
|
+
*/
|
|
96
|
+
export function projectOrg(from = process.cwd()) {
|
|
97
|
+
for (let dir = from;; dir = dirname(dir)) {
|
|
98
|
+
const file = join(dir, "package.json");
|
|
99
|
+
if (existsSync(file)) {
|
|
100
|
+
const org = orgIn(file);
|
|
101
|
+
if (org !== undefined)
|
|
102
|
+
return { org, file };
|
|
103
|
+
}
|
|
104
|
+
if (dirname(dir) === dir)
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function orgIn(file) {
|
|
109
|
+
try {
|
|
110
|
+
const said = JSON.parse(readFileSync(file, "utf8"));
|
|
111
|
+
const org = said.pinecall?.org;
|
|
112
|
+
return typeof org === "string" && org !== "" ? org : undefined;
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The profile `--profile` named; else the one of the org this project names, and none at all when
|
|
120
|
+
* this machine holds no profile of it — never the active one, which is another org's; else the
|
|
121
|
+
* active one. Among several profiles of that org, the one that opens the world asked for — the
|
|
122
|
+
* sandbox when none was — because a machine logged in before one login kept both worlds has a
|
|
123
|
+
* profile per world; then the one named after the org, which the login names by its bare slug.
|
|
124
|
+
*/
|
|
125
|
+
export function choose(named, config, from = process.cwd(), world = "sandbox") {
|
|
126
|
+
if (named !== undefined)
|
|
127
|
+
return { name: named };
|
|
128
|
+
const project = projectOrg(from);
|
|
129
|
+
if (project === undefined)
|
|
130
|
+
return { name: config.active };
|
|
131
|
+
const theirs = Object.keys(config.profiles)
|
|
132
|
+
.filter((name) => config.profiles[name].org === project.org || name === project.org)
|
|
133
|
+
.sort();
|
|
134
|
+
const opens = (name) => {
|
|
135
|
+
const profile = config.profiles[name];
|
|
136
|
+
return profile.keys?.[world] !== undefined || profile.env === world;
|
|
137
|
+
};
|
|
138
|
+
const inWorld = theirs.filter(opens);
|
|
139
|
+
const pool = inWorld.length > 0 ? inWorld : theirs;
|
|
140
|
+
const name = pool.includes(project.org) ? project.org : pool[0];
|
|
141
|
+
return { name, project };
|
|
142
|
+
}
|
|
143
|
+
/** The profile a verb runs on: the one named, the project's org's, or the active one, or nothing at all. */
|
|
144
|
+
export function profileFor(named, home = pinecallHome(), from = process.cwd()) {
|
|
80
145
|
const config = readConfig(home);
|
|
81
|
-
const name = named
|
|
146
|
+
const { name } = choose(named, config, from);
|
|
82
147
|
return name === undefined ? undefined : config.profiles[name];
|
|
83
148
|
}
|
|
149
|
+
/** The gateway this machine was pointed at, or nothing — and then it is the cloud's. */
|
|
150
|
+
export function chosenGateway(home = pinecallHome()) {
|
|
151
|
+
return readConfig(home).gateway;
|
|
152
|
+
}
|
|
153
|
+
/** Point this machine at a gateway, so `pinecall login` and every verb with no key go there. */
|
|
154
|
+
export function chooseGateway(url, home = pinecallHome()) {
|
|
155
|
+
writeConfig({ ...readConfig(home), gateway: url }, home);
|
|
156
|
+
}
|
|
84
157
|
/** Which profile is in hand, for a line that says where a verb is about to go. */
|
|
85
158
|
export function activeName(home = pinecallHome()) {
|
|
86
159
|
return readConfig(home).active;
|
|
@@ -101,6 +174,32 @@ export function activate(name, home = pinecallHome()) {
|
|
|
101
174
|
writeConfig(config, home);
|
|
102
175
|
return true;
|
|
103
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Move a profile to one of its worlds, with the key the login already minted for it.
|
|
179
|
+
*
|
|
180
|
+
* A person holds a key in each world of an org, and used to hold only the sandbox one: looking at
|
|
181
|
+
* production from a terminal meant a second profile nobody knew how to make.
|
|
182
|
+
*/
|
|
183
|
+
export function inWorld(name, world, home = pinecallHome()) {
|
|
184
|
+
const config = readConfig(home);
|
|
185
|
+
const profile = config.profiles[name];
|
|
186
|
+
if (profile === undefined)
|
|
187
|
+
return "unknown";
|
|
188
|
+
const key = profile.keys?.[world];
|
|
189
|
+
if (key === undefined)
|
|
190
|
+
return "nokey";
|
|
191
|
+
config.profiles[name] = { ...profile, key, env: world };
|
|
192
|
+
config.active = name;
|
|
193
|
+
writeConfig(config, home);
|
|
194
|
+
return "moved";
|
|
195
|
+
}
|
|
196
|
+
/** A name for an org's profile: its slug, and the gateway's host beside it when another gateway took the slug. */
|
|
197
|
+
export function nameForOrg(slug, url, config) {
|
|
198
|
+
const held = config.profiles[slug];
|
|
199
|
+
if (held === undefined || normalised(held.url) === normalised(url))
|
|
200
|
+
return slug;
|
|
201
|
+
return `${slug}@${new URL(url).host}`;
|
|
202
|
+
}
|
|
104
203
|
/**
|
|
105
204
|
* Forget a gateway. False when there is no such name, so a typo is never silence.
|
|
106
205
|
*
|
|
@@ -114,7 +213,8 @@ export function forget(name, home = pinecallHome()) {
|
|
|
114
213
|
return false;
|
|
115
214
|
const { [name]: _gone, ...left } = config.profiles;
|
|
116
215
|
const active = config.active === name ? undefined : config.active;
|
|
117
|
-
|
|
216
|
+
// The gateway this machine is pointed at is not a profile's: it stays.
|
|
217
|
+
writeConfig({ ...(active === undefined ? {} : { active }), ...(config.gateway === undefined ? {} : { gateway: config.gateway }), profiles: left }, home);
|
|
118
218
|
return true;
|
|
119
219
|
}
|
|
120
220
|
/** The phone this person calls FROM at the gateway in hand, so a ring reaches their own agent. */
|
|
@@ -124,7 +224,7 @@ export function callingFrom(home = pinecallHome()) {
|
|
|
124
224
|
/** Say which phone is yours here, or take it back. False when there is no profile to write it on. */
|
|
125
225
|
export function callsFrom(number, home = pinecallHome()) {
|
|
126
226
|
const config = readConfig(home);
|
|
127
|
-
const name = theChosenProfile()
|
|
227
|
+
const { name } = choose(theChosenProfile(), config);
|
|
128
228
|
if (name === undefined || config.profiles[name] === undefined)
|
|
129
229
|
return false;
|
|
130
230
|
const { calling: _was, ...rest } = config.profiles[name];
|
|
@@ -184,6 +284,8 @@ function parsedConfig(home) {
|
|
|
184
284
|
const config = { profiles: profiles };
|
|
185
285
|
if (typeof read["active"] === "string")
|
|
186
286
|
config.active = read["active"];
|
|
287
|
+
if (typeof read["gateway"] === "string")
|
|
288
|
+
config.gateway = read["gateway"];
|
|
187
289
|
return config;
|
|
188
290
|
}
|
|
189
291
|
// A missing file, an unreadable one and a broken one are all the same answer: nothing. A config
|
package/dist/cli/profiles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/cli/profiles.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE7E,2FAA2F;AAC3F,MAAM,cAAc,GAAG,KAAK,CAAC;AAC7B,MAAM,SAAS,GAAG,KAAK,CAAC;AAExB,MAAM,MAAM,GAAG,aAAa,CAAC;AAoB7B;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CAAC,IAAI,GAAW,YAAY,EAAE;IACtD,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;GAKG;AACH,SAAS,QAAQ,CAAC,IAAY;I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