@mgsoftwarebv/mg-dashboard-mcp 7.4.22 → 7.4.23
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/index.js +16 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8474,16 +8474,16 @@ var HermesCompanyError = class extends Error {
|
|
|
8474
8474
|
}
|
|
8475
8475
|
};
|
|
8476
8476
|
function containerNameFor(brandId) {
|
|
8477
|
-
return `hermes-${brandId}`;
|
|
8477
|
+
return `hermes-${brandId}-company`;
|
|
8478
8478
|
}
|
|
8479
8479
|
function modulesFlags(modules) {
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8480
|
+
return [
|
|
8481
|
+
modules.seo ? "--seo" : "--no-seo",
|
|
8482
|
+
modules.ads ? "--ads" : "--no-ads",
|
|
8483
|
+
modules.catalogus ? "--catalogus" : "--no-catalogus",
|
|
8484
|
+
modules.customerFacing ? "--customer-facing" : "--no-customer-facing",
|
|
8485
|
+
modules.exact ? "--exact" : "--no-exact"
|
|
8486
|
+
].join(" ");
|
|
8487
8487
|
}
|
|
8488
8488
|
function parseBrandId(raw) {
|
|
8489
8489
|
const brandId = raw.trim().toLowerCase();
|
|
@@ -10621,8 +10621,9 @@ async function validateApiKey(key) {
|
|
|
10621
10621
|
);
|
|
10622
10622
|
await db.execute(sql`
|
|
10623
10623
|
UPDATE dashboard_mcp_api_key
|
|
10624
|
-
SET last_used_at =
|
|
10624
|
+
SET last_used_at = now()
|
|
10625
10625
|
WHERE id = ${data.id}
|
|
10626
|
+
AND (last_used_at IS NULL OR last_used_at < now() - interval '60 seconds')
|
|
10626
10627
|
`);
|
|
10627
10628
|
const moduleCount = MODULE_KEYS.filter((k) => permissions.modules[k]).length;
|
|
10628
10629
|
console.error(
|
|
@@ -10865,13 +10866,16 @@ async function validateSshKey(pubkeyPathInput, expectedApiKeyId) {
|
|
|
10865
10866
|
apiRow.allowed_server_ids,
|
|
10866
10867
|
permissions.resources.ssh_servers
|
|
10867
10868
|
);
|
|
10868
|
-
const nowIso = (/* @__PURE__ */ new Date()).toISOString();
|
|
10869
10869
|
await Promise.all([
|
|
10870
10870
|
db.execute(
|
|
10871
|
-
sql`UPDATE dashboard_mcp_ssh_key SET last_used_at =
|
|
10871
|
+
sql`UPDATE dashboard_mcp_ssh_key SET last_used_at = now()
|
|
10872
|
+
WHERE id = ${keyRow.id}
|
|
10873
|
+
AND (last_used_at IS NULL OR last_used_at < now() - interval '60 seconds')`
|
|
10872
10874
|
),
|
|
10873
10875
|
db.execute(
|
|
10874
|
-
sql`UPDATE dashboard_mcp_api_key SET last_used_at =
|
|
10876
|
+
sql`UPDATE dashboard_mcp_api_key SET last_used_at = now()
|
|
10877
|
+
WHERE id = ${apiRow.id}
|
|
10878
|
+
AND (last_used_at IS NULL OR last_used_at < now() - interval '60 seconds')`
|
|
10875
10879
|
)
|
|
10876
10880
|
]);
|
|
10877
10881
|
const moduleCount = MODULE_KEYS.filter((k) => permissions.modules[k]).length;
|
package/package.json
CHANGED