viza 1.9.12 → 1.9.13
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getEnv } from "../../../context/env.js";
|
|
2
|
-
import { getRunner,
|
|
2
|
+
import { getRunner, RUNTIME_WORKER_CONTROL_INTENT } from "../../../context/hubIntent.js";
|
|
3
3
|
import { dispatchIntentAndWait } from "../../../core/dispatch.js";
|
|
4
4
|
import { policy } from "./policy.js";
|
|
5
5
|
import { showDispatchRuns } from "./show-runs.js";
|
|
@@ -14,7 +14,7 @@ import { showDispatchRuns } from "./show-runs.js";
|
|
|
14
14
|
export async function runsCommand(options) {
|
|
15
15
|
// 1️⃣ Resolve environment
|
|
16
16
|
const env = getEnv();
|
|
17
|
-
const intent =
|
|
17
|
+
const intent = RUNTIME_WORKER_CONTROL_INTENT;
|
|
18
18
|
const runner = getRunner();
|
|
19
19
|
// Resolve allowed teams (same contract as other commands)
|
|
20
20
|
const allowedTeams = Array.from(policy.byEnv[env]);
|
|
@@ -31,7 +31,7 @@ export async function runsCommand(options) {
|
|
|
31
31
|
intent,
|
|
32
32
|
commandType: "dispatch.runs",
|
|
33
33
|
infraKey: "core",
|
|
34
|
-
runType: "
|
|
34
|
+
runType: "runtime",
|
|
35
35
|
targetEnv: env,
|
|
36
36
|
allowedTeams,
|
|
37
37
|
selfHosted: options.selfHosted === true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getEnv } from "../../../../context/env.js";
|
|
2
|
-
import {
|
|
2
|
+
import { RUNTIME_WORKER_CONTROL_INTENT } from "../../../../context/hubIntent.js";
|
|
3
3
|
import { dispatchIntentAndWait } from "../../../../core/dispatch.js";
|
|
4
4
|
import { policy } from "./policy.js";
|
|
5
5
|
/**
|
|
@@ -15,7 +15,7 @@ import { policy } from "./policy.js";
|
|
|
15
15
|
export async function restoreGithubSecretsCommand(options) {
|
|
16
16
|
// 1) Resolve environment
|
|
17
17
|
const env = getEnv();
|
|
18
|
-
const intent =
|
|
18
|
+
const intent = RUNTIME_WORKER_CONTROL_INTENT;
|
|
19
19
|
// Resolve allowed teams
|
|
20
20
|
// - Dispatch mode: restrict by targetEnv
|
|
21
21
|
// - Status mode: allow union of all env teams (read-only query)
|
|
@@ -47,7 +47,7 @@ export async function restoreGithubSecretsCommand(options) {
|
|
|
47
47
|
intent,
|
|
48
48
|
commandType: "github.secrets.restore",
|
|
49
49
|
infraKey: "core",
|
|
50
|
-
runType: "
|
|
50
|
+
runType: "runtime",
|
|
51
51
|
targetEnv: env,
|
|
52
52
|
allowedTeams,
|
|
53
53
|
selfHosted: options.selfHosted === true,
|
|
@@ -18,11 +18,6 @@ const RESOURCE_DEPLOYER_INTENT_BY_ENV = "deployer";
|
|
|
18
18
|
* Build & publish application layer
|
|
19
19
|
*/
|
|
20
20
|
export const RESOURCE_BUILDER_INTENT_BY_ENV = "builder";
|
|
21
|
-
/**
|
|
22
|
-
* Runtime command hub (worker layer)
|
|
23
|
-
* Single intent for both dev and prod (env derived at gateway)
|
|
24
|
-
*/
|
|
25
|
-
const RUNTIME_HUB_INTENT = "hub-worker";
|
|
26
21
|
/**
|
|
27
22
|
* Runtime worker intents (explicit, no mapping guess)
|
|
28
23
|
*/
|
|
@@ -52,12 +47,3 @@ export function resolvePrivateHubIntent() {
|
|
|
52
47
|
return RESOURCE_HUB_INTENT_BY_ENV;
|
|
53
48
|
}
|
|
54
49
|
}
|
|
55
|
-
export function resolveHubWorkerIntent() {
|
|
56
|
-
const r = currentRunner;
|
|
57
|
-
switch (r) {
|
|
58
|
-
case "deployer":
|
|
59
|
-
return RUNTIME_HUB_INTENT;
|
|
60
|
-
default:
|
|
61
|
-
return RUNTIME_HUB_INTENT;
|
|
62
|
-
}
|
|
63
|
-
}
|