@resolveio/server-lib 22.3.115 → 22.3.116

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "22.3.115",
3
+ "version": "22.3.116",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "package": "./build_package.sh",
@@ -2309,6 +2309,7 @@ function buildResolveIORunnerQaWorkflowProbeScript() {
2309
2309
  'const targetRoute = resolveTargetRoute(routeArg);',
2310
2310
  'const matrixPath = path.join(artifactDir, "qa-coverage-matrix.json");',
2311
2311
  'const resultPath = path.join(artifactDir, "qa-workflow-probe-result.json");',
2312
+ 'const authBootstrapResultPath = path.join(artifactDir, "auth-bootstrap-result.json");',
2312
2313
  'const passScreenshotPath = path.join(artifactDir, "qa-workflow-route-ready.jpg");',
2313
2314
  'const failScreenshotPath = path.join(artifactDir, "qa-workflow-route-blocked.jpg");',
2314
2315
  'const clientUrl = stripTrailingSlash(process.env.RESOLVEIO_RUNNER_QA_CLIENT_URL || process.env.RESOLVEIO_SUPPORT_QA_CLIENT_URL || `http://localhost:${process.env.RESOLVEIO_SUPPORT_QA_CLIENT_PORT || "4200"}`);',
@@ -2495,6 +2496,22 @@ function buildResolveIORunnerQaWorkflowProbeScript() {
2495
2496
  ' const text = summary && summary.bodyTextSnippet || "";',
2496
2497
  ' return !text || /^(Home|MENU|Logout|\\u00A9|The All-in-One Software)\\b/i.test(text);',
2497
2498
  '}',
2499
+ 'function freshAuthBootstrapProof() {',
2500
+ ' const proof = readJson(authBootstrapResultPath);',
2501
+ ' if (!proof || proof.status !== "pass" || !proof.page) return null;',
2502
+ ' if (!pathMatchesRoute(proof.page.url || "", targetRoute)) return null;',
2503
+ ' if (proof.targetRoute && !pathMatchesRoute(new URL(proof.targetRoute, clientUrl).href, targetRoute)) return null;',
2504
+ ' if (isShellOnlySummary(proof.page)) return null;',
2505
+ ' const text = proof.page.bodyTextSnippet || "";',
2506
+ ' if (!text || /Employee\\/Customer Login|Employee Sign In|Customer Access|Unable to sign in/i.test(text)) return null;',
2507
+ ' if (text.includes("*** OFFLINE MODE ***")) return null;',
2508
+ ' try {',
2509
+ ' const stat = fs.statSync(authBootstrapResultPath);',
2510
+ ' const maxAgeMs = Number(process.env.RESOLVEIO_RUNNER_QA_AUTH_PROOF_MAX_AGE_MS || process.env.RESOLVEIO_SUPPORT_QA_AUTH_PROOF_MAX_AGE_MS || 300000);',
2511
+ ' if (Date.now() - stat.mtimeMs > maxAgeMs) return null;',
2512
+ ' } catch (error) { return null; }',
2513
+ ' return proof;',
2514
+ '}',
2498
2515
  'async function waitForHydratedTargetRoute(page) {',
2499
2516
  ' const deadline = Date.now() + Number(process.env.RESOLVEIO_RUNNER_QA_ROUTE_HYDRATION_TIMEOUT_MS || process.env.RESOLVEIO_SUPPORT_QA_ROUTE_HYDRATION_TIMEOUT_MS || 45000);',
2500
2517
  ' let summary = await pageSummary(page);',
@@ -2594,6 +2611,16 @@ function buildResolveIORunnerQaWorkflowProbeScript() {
2594
2611
  ' process.exitCode = 0;',
2595
2612
  ' return;',
2596
2613
  ' }',
2614
+ ' const bootstrapProof = freshAuthBootstrapProof();',
2615
+ ' if (bootstrapProof) {',
2616
+ ' const caption = `Workflow route ready from authenticated bootstrap proof: ${targetRoute} loaded for the seeded QA user with live data before a transient probe shell state.`;',
2617
+ ' updateMatrix("pass", bootstrapProof.screenshot || passScreenshotPath, caption, "Authenticated bootstrap proof loaded the exact target route with live seeded data; deeper row-specific UI/data proof still required.");',
2618
+ ' const result = { status: "pass", clientUrl, serverUrl, targetRoute, screenshot: bootstrapProof.screenshot || passScreenshotPath, caption, recoveredFromTransientError: error && (error.message || String(error)) || "bootstrap proof recovery", page: bootstrapProof.page, authBootstrapProof: authBootstrapResultPath, matrix: matrixPath };',
2619
+ ' writeJson(resultPath, result);',
2620
+ ' console.log(JSON.stringify(result, null, 2));',
2621
+ ' process.exitCode = 0;',
2622
+ ' return;',
2623
+ ' }',
2597
2624
  ' const caption = `Blocked before workflow QA: ${targetRoute} could not be reached in authenticated local QA.`;',
2598
2625
  ' updateMatrix("blocked", failScreenshotPath, caption, error && (error.message || String(error)) || "Workflow probe failed");',
2599
2626
  ' const result = { status: "blocked", clientUrl, serverUrl, targetRoute, screenshot: failScreenshotPath, caption, error: error && (error.stack || error.message) || String(error), page: summary, matrix: matrixPath };',