@drisp/cli 0.4.0 → 0.4.1
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/athena-gateway.js +1 -1
- package/dist/cli.js +46 -2
- package/package.json +1 -1
package/dist/athena-gateway.js
CHANGED
|
@@ -2100,7 +2100,7 @@ var cachedVersion = null;
|
|
|
2100
2100
|
function readVersion() {
|
|
2101
2101
|
if (cachedVersion !== null) return cachedVersion;
|
|
2102
2102
|
try {
|
|
2103
|
-
const injected = "0.4.
|
|
2103
|
+
const injected = "0.4.1";
|
|
2104
2104
|
if (typeof injected === "string" && injected.length > 0) {
|
|
2105
2105
|
cachedVersion = injected;
|
|
2106
2106
|
return cachedVersion;
|
package/dist/cli.js
CHANGED
|
@@ -27412,7 +27412,7 @@ var cachedVersion = null;
|
|
|
27412
27412
|
function readPackageVersion() {
|
|
27413
27413
|
if (cachedVersion !== null) return cachedVersion;
|
|
27414
27414
|
try {
|
|
27415
|
-
const injected = "0.4.
|
|
27415
|
+
const injected = "0.4.1";
|
|
27416
27416
|
if (typeof injected === "string" && injected.length > 0) {
|
|
27417
27417
|
cachedVersion = injected;
|
|
27418
27418
|
return cachedVersion;
|
|
@@ -27775,13 +27775,50 @@ async function runDashboardCommand(input, deps = {}) {
|
|
|
27775
27775
|
pairedAt: now()
|
|
27776
27776
|
};
|
|
27777
27777
|
writeConfig(config);
|
|
27778
|
+
const pairedRunner = parsed.runners?.[0];
|
|
27779
|
+
let reloadResult;
|
|
27780
|
+
if (pairedRunner) {
|
|
27781
|
+
const consoleConfig = {
|
|
27782
|
+
broker_url: consoleBrokerUrl(origin, pairedRunner.runnerId),
|
|
27783
|
+
runner_id: pairedRunner.runnerId,
|
|
27784
|
+
dashboard_config: true
|
|
27785
|
+
};
|
|
27786
|
+
writeConsoleConfig(consoleConfig);
|
|
27787
|
+
if (!flags.json) {
|
|
27788
|
+
logOut(
|
|
27789
|
+
`dashboard: console linked runner ${pairedRunner.runnerId} to ${origin}`
|
|
27790
|
+
);
|
|
27791
|
+
}
|
|
27792
|
+
reloadResult = await reloadGatewayChannels();
|
|
27793
|
+
if (reloadResult.ok) {
|
|
27794
|
+
if (!flags.json) {
|
|
27795
|
+
logOut(
|
|
27796
|
+
`dashboard: gateway channels reloaded (${reloadResult.message})`
|
|
27797
|
+
);
|
|
27798
|
+
}
|
|
27799
|
+
} else {
|
|
27800
|
+
logError(`dashboard: gateway reload skipped: ${reloadResult.message}`);
|
|
27801
|
+
if (!flags.json) {
|
|
27802
|
+
logOut(
|
|
27803
|
+
"dashboard: start or reload the gateway before using the Console tab."
|
|
27804
|
+
);
|
|
27805
|
+
}
|
|
27806
|
+
}
|
|
27807
|
+
}
|
|
27778
27808
|
if (flags.json) {
|
|
27779
27809
|
logOut(
|
|
27780
27810
|
JSON.stringify({
|
|
27781
27811
|
ok: true,
|
|
27782
27812
|
instanceId: parsed.instanceId,
|
|
27783
27813
|
dashboardUrl: origin,
|
|
27784
|
-
configPath: configPath()
|
|
27814
|
+
configPath: configPath(),
|
|
27815
|
+
...parsed.runners ? { runners: parsed.runners } : {},
|
|
27816
|
+
...reloadResult ? {
|
|
27817
|
+
gatewayReload: {
|
|
27818
|
+
ok: reloadResult.ok,
|
|
27819
|
+
message: reloadResult.message
|
|
27820
|
+
}
|
|
27821
|
+
} : {}
|
|
27785
27822
|
})
|
|
27786
27823
|
);
|
|
27787
27824
|
} else {
|
|
@@ -28065,6 +28102,13 @@ function parsePairResponse(raw) {
|
|
|
28065
28102
|
return {
|
|
28066
28103
|
instanceId,
|
|
28067
28104
|
refreshToken,
|
|
28105
|
+
...Array.isArray(obj["runners"]) ? {
|
|
28106
|
+
runners: obj["runners"].map((entry) => {
|
|
28107
|
+
if (typeof entry !== "object" || entry === null) return null;
|
|
28108
|
+
const runnerId = entry["runnerId"];
|
|
28109
|
+
return typeof runnerId === "string" && runnerId.length > 0 ? { runnerId } : null;
|
|
28110
|
+
}).filter((entry) => entry !== null)
|
|
28111
|
+
} : {},
|
|
28068
28112
|
...typeof obj["jti"] === "string" ? { jti: obj["jti"] } : {},
|
|
28069
28113
|
...typeof obj["accessToken"] === "string" ? { accessToken: obj["accessToken"] } : {},
|
|
28070
28114
|
...typeof obj["expiresInSec"] === "number" ? { expiresInSec: obj["expiresInSec"] } : {}
|