@fourier-labs/harbour 0.1.9 → 0.1.10

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.
@@ -66,7 +66,7 @@ export async function productionise(rootArg, client, output, tenantId, includePa
66
66
  const evidence = await waitForSave(client, operationRef, graph, execution, output);
67
67
  const report = structured(await client.call("harbour_build_verification_report", { operationId: operationRef, surface: "codex", graph, sourceControlEvidence: evidence.sourceControlEvidence, runnerEvidence: evidence.runnerEvidence }));
68
68
  output("Harbour verified the saved app.");
69
- return { cliVersion: CLI_VERSION, operationRef, result: safeVerificationResult(report) };
69
+ return { cliVersion: CLI_VERSION, operationRef, result: safeVerificationResult(report, evidence) };
70
70
  }
71
71
  catch (error) {
72
72
  if (error instanceof CliError || (error && typeof error === "object" && "code" in error))
@@ -109,7 +109,7 @@ function isProhibitedSecretPath(path) {
109
109
  return false;
110
110
  return /(^|\/)(?:\.env(?:\.[^/]+)?|\.npmrc|id_rsa|[^/]+\.(?:pem|key))$/i.test(path);
111
111
  }
112
- function safeVerificationResult(value) {
112
+ function safeVerificationResult(value, statusEvidence) {
113
113
  if (!value || typeof value !== "object" || Array.isArray(value))
114
114
  return { verification: "completed" };
115
115
  const record = value;
@@ -123,7 +123,13 @@ function safeVerificationResult(value) {
123
123
  ? record.status
124
124
  : "completed",
125
125
  ...(typeof decision?.assuranceLevel === "string" ? { assuranceLevel: decision.assuranceLevel } : {}),
126
- ...(typeof record.protectedUrl === "string" ? { protectedUrl: record.protectedUrl } : {})
126
+ ...(typeof record.protectedUrl === "string" ? { protectedUrl: record.protectedUrl } : {}),
127
+ ...((record.sourceControlEvidence ?? statusEvidence?.sourceControlEvidence) && typeof (record.sourceControlEvidence ?? statusEvidence?.sourceControlEvidence) === "object" && !Array.isArray(record.sourceControlEvidence ?? statusEvidence?.sourceControlEvidence)
128
+ ? { sourceControlEvidence: record.sourceControlEvidence ?? statusEvidence?.sourceControlEvidence }
129
+ : {}),
130
+ ...((record.runnerEvidence ?? statusEvidence?.runnerEvidence) && typeof (record.runnerEvidence ?? statusEvidence?.runnerEvidence) === "object" && !Array.isArray(record.runnerEvidence ?? statusEvidence?.runnerEvidence)
131
+ ? { runnerEvidence: record.runnerEvidence ?? statusEvidence?.runnerEvidence }
132
+ : {})
127
133
  };
128
134
  }
129
135
  function projectName(value) { const name = value.split(/[\\/]/).filter(Boolean).at(-1) ?? "harbour-app"; return name.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "harbour-app"; }
@@ -1 +1 @@
1
- export const CLI_VERSION = "0.1.9";
1
+ export const CLI_VERSION = "0.1.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fourier-labs/harbour",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Harbour productionisation helper",
5
5
  "type": "module",
6
6
  "bin": { "harbour": "./dist/packages/harbour-cli/src/cli.js" },