pantheon-cli 0.2.62 → 0.2.64
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/pantheon.mjs +30 -3
- package/package.json +1 -1
package/dist/pantheon.mjs
CHANGED
|
@@ -45403,6 +45403,7 @@ function candidateHosts(explicit) {
|
|
|
45403
45403
|
return ["http://localhost:3000"];
|
|
45404
45404
|
}
|
|
45405
45405
|
async function connect(opts) {
|
|
45406
|
+
const previous = loadMachineConfig();
|
|
45406
45407
|
const home = opts.home || defaultHome();
|
|
45407
45408
|
const code = opts.code.replace(/\s/g, "").toUpperCase();
|
|
45408
45409
|
const pairing = step("Verifying pairing code");
|
|
@@ -45417,7 +45418,16 @@ async function connect(opts) {
|
|
|
45417
45418
|
// The name is what the dashboard lists, and it is also the key the
|
|
45418
45419
|
// server de-duplicates on: pairing this machine again replaces its own
|
|
45419
45420
|
// row instead of adding another anonymous one.
|
|
45420
|
-
body: JSON.stringify({
|
|
45421
|
+
body: JSON.stringify({
|
|
45422
|
+
code,
|
|
45423
|
+
name: hostname2(),
|
|
45424
|
+
...previous && previous.config.apiUrl.replace(/\/$/, "") === host.replace(/\/$/, "") ? {
|
|
45425
|
+
previousMachine: {
|
|
45426
|
+
machineId: previous.config.machineId,
|
|
45427
|
+
machineSecret: previous.credentials.machineSecret
|
|
45428
|
+
}
|
|
45429
|
+
} : {}
|
|
45430
|
+
})
|
|
45421
45431
|
});
|
|
45422
45432
|
const payload = await res.json();
|
|
45423
45433
|
if (res.ok) {
|
|
@@ -45481,6 +45491,12 @@ async function connect(opts) {
|
|
|
45481
45491
|
field("Install", String(body.installationId)),
|
|
45482
45492
|
field("Repo", `${body.repo} (private)`),
|
|
45483
45493
|
field("Vault", `${home}${vaultNote(fresh, archived)}`),
|
|
45494
|
+
...body.switchedFrom ? [
|
|
45495
|
+
field(
|
|
45496
|
+
"Account switch",
|
|
45497
|
+
`@${body.switchedFrom} \u2192 @${body.account}; reconnect remote MCP clients`
|
|
45498
|
+
)
|
|
45499
|
+
] : [],
|
|
45484
45500
|
...archived ? [field("Set aside", `${archived} \u2014 spaces from the old repo`)] : []
|
|
45485
45501
|
].join("\n"),
|
|
45486
45502
|
failure ? field("MCP", `failed \u2014 ${failure}`) : block("Configured", written),
|
|
@@ -45595,6 +45611,7 @@ async function mintVaultToken(apiUrl, machineId, machineSecret) {
|
|
|
45595
45611
|
return body.token;
|
|
45596
45612
|
}
|
|
45597
45613
|
async function bootstrapFromToken(token, opts = {}) {
|
|
45614
|
+
const previous = loadMachineConfig();
|
|
45598
45615
|
const home = opts.home || defaultHome();
|
|
45599
45616
|
let body = null;
|
|
45600
45617
|
let apiUrl = "";
|
|
@@ -45607,7 +45624,15 @@ async function bootstrapFromToken(token, opts = {}) {
|
|
|
45607
45624
|
"content-type": "application/json",
|
|
45608
45625
|
authorization: `Bearer ${token}`
|
|
45609
45626
|
},
|
|
45610
|
-
body: JSON.stringify({
|
|
45627
|
+
body: JSON.stringify({
|
|
45628
|
+
name: hostname3(),
|
|
45629
|
+
...previous && previous.config.apiUrl.replace(/\/$/, "") === host.replace(/\/$/, "") ? {
|
|
45630
|
+
previousMachine: {
|
|
45631
|
+
machineId: previous.config.machineId,
|
|
45632
|
+
machineSecret: previous.credentials.machineSecret
|
|
45633
|
+
}
|
|
45634
|
+
} : {}
|
|
45635
|
+
})
|
|
45611
45636
|
});
|
|
45612
45637
|
const payload = await res.json();
|
|
45613
45638
|
if (res.ok) {
|
|
@@ -45640,7 +45665,9 @@ async function bootstrapFromToken(token, opts = {}) {
|
|
|
45640
45665
|
installAgentAssets();
|
|
45641
45666
|
} catch {
|
|
45642
45667
|
}
|
|
45643
|
-
log(
|
|
45668
|
+
log(
|
|
45669
|
+
`${body.switchedFrom ? `switched ${body.switchedFrom} \u2192 ${body.account}` : `paired ${body.account}`} \xB7 vault ${body.repo} \xB7 home ${home}${body.switchedFrom ? " \xB7 reconnect remote MCP clients" : ""}`
|
|
45670
|
+
);
|
|
45644
45671
|
return home;
|
|
45645
45672
|
}
|
|
45646
45673
|
|
package/package.json
CHANGED