viza 1.8.45 → 1.8.46
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.
|
@@ -13,7 +13,7 @@ import { policy } from "./policy.js";
|
|
|
13
13
|
export async function logsCommand(runId, options) {
|
|
14
14
|
// 1️⃣ Resolve environment
|
|
15
15
|
const env = getEnv();
|
|
16
|
-
const intent = resolveHubIntent();
|
|
16
|
+
const intent = resolveHubIntent(false);
|
|
17
17
|
// Resolve allowed teams (same contract as other commands)
|
|
18
18
|
const allowedTeams = Array.from(policy.byEnv[env]);
|
|
19
19
|
// 3️⃣ Dispatch intent to hub
|
|
@@ -15,7 +15,7 @@ import { policy } from "./policy.js";
|
|
|
15
15
|
export async function deployCommandHubCommand(options) {
|
|
16
16
|
// 1) Resolve environment from global CLI context
|
|
17
17
|
const env = getEnv();
|
|
18
|
-
const intent = resolveHubIntent();
|
|
18
|
+
const intent = resolveHubIntent(options.selfHosted === true);
|
|
19
19
|
// Resolve allowed teams for the current environment only.
|
|
20
20
|
// CLI performs a fail-fast UX check but must still respect env boundaries.
|
|
21
21
|
const allowedTeams = Array.from(policy.byEnv[env]);
|
|
@@ -23,7 +23,10 @@ const RESOURCE_BUILDER_INTENT_BY_ENV = "builder";
|
|
|
23
23
|
* Single intent for both dev and prod (env derived at gateway)
|
|
24
24
|
*/
|
|
25
25
|
const RUNTIME_HUB_INTENT = "hub-worker";
|
|
26
|
-
export function resolveHubIntent() {
|
|
26
|
+
export function resolveHubIntent(selfHosted) {
|
|
27
|
+
if (selfHosted) {
|
|
28
|
+
return RESOURCE_HUB_INTENT_BY_ENV;
|
|
29
|
+
}
|
|
27
30
|
const r = currentRunner;
|
|
28
31
|
switch (r) {
|
|
29
32
|
case "builder":
|