@openparachute/vault 0.6.4-rc.11 → 0.6.4-rc.12
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/package.json
CHANGED
|
@@ -62,17 +62,17 @@ function captureLogs(): {
|
|
|
62
62
|
|
|
63
63
|
describe("self-register", () => {
|
|
64
64
|
test("buildVaultServicePaths — no vaults yet → empty paths (no phantom /vault/default, #478)", () => {
|
|
65
|
-
expect(buildVaultServicePaths(undefined, []
|
|
65
|
+
expect(buildVaultServicePaths(undefined, [])).toEqual([]);
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
test("buildVaultServicePaths — default vault sorts first", () => {
|
|
69
69
|
expect(
|
|
70
|
-
buildVaultServicePaths("default", ["alpha", "default", "beta"]
|
|
70
|
+
buildVaultServicePaths("default", ["alpha", "default", "beta"]),
|
|
71
71
|
).toEqual(["/vault/default", "/vault/alpha", "/vault/beta"]);
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
test("buildVaultServicePaths — no default → map by listed order", () => {
|
|
75
|
-
expect(buildVaultServicePaths(undefined, ["alpha", "beta"]
|
|
75
|
+
expect(buildVaultServicePaths(undefined, ["alpha", "beta"])).toEqual([
|
|
76
76
|
"/vault/alpha",
|
|
77
77
|
"/vault/beta",
|
|
78
78
|
]);
|
|
@@ -80,7 +80,7 @@ describe("self-register", () => {
|
|
|
80
80
|
|
|
81
81
|
test("buildVaultServicePaths — default points to missing vault → ignore default", () => {
|
|
82
82
|
expect(
|
|
83
|
-
buildVaultServicePaths("missing", ["alpha", "beta"]
|
|
83
|
+
buildVaultServicePaths("missing", ["alpha", "beta"]),
|
|
84
84
|
).toEqual(["/vault/alpha", "/vault/beta"]);
|
|
85
85
|
});
|
|
86
86
|
|
package/src/self-register.ts
CHANGED
|
@@ -69,7 +69,6 @@ import { listVaults, readGlobalConfig, DEFAULT_PORT } from "./config.ts";
|
|
|
69
69
|
export function buildVaultServicePaths(
|
|
70
70
|
defaultVault: string | undefined,
|
|
71
71
|
vaults: readonly string[],
|
|
72
|
-
fallbackFromManifest: readonly string[],
|
|
73
72
|
): string[] {
|
|
74
73
|
if (vaults.length === 0) return [];
|
|
75
74
|
if (defaultVault && vaults.includes(defaultVault)) {
|
|
@@ -165,7 +164,7 @@ export function selfRegister(deps: SelfRegisterDeps): SelfRegisterResult {
|
|
|
165
164
|
return { status: "failed", reason: msg };
|
|
166
165
|
}
|
|
167
166
|
|
|
168
|
-
const paths = buildVaultServicePaths(globalConfig.default_vault, vaults
|
|
167
|
+
const paths = buildVaultServicePaths(globalConfig.default_vault, vaults);
|
|
169
168
|
const port = globalConfig.port ?? DEFAULT_PORT;
|
|
170
169
|
|
|
171
170
|
// Derive the health path from the primary path (paths[0]) rather than
|