@floless/app 0.9.2 → 0.10.0

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.
@@ -52361,7 +52361,7 @@ function appVersion() {
52361
52361
  return resolveVersion({
52362
52362
  isSea: isSea2(),
52363
52363
  sqVersionXml: readSqVersionXml(),
52364
- define: true ? "0.9.2" : void 0,
52364
+ define: true ? "0.10.0" : void 0,
52365
52365
  pkgVersion: readPkgVersion()
52366
52366
  });
52367
52367
  }
@@ -52371,7 +52371,7 @@ function resolveChannel(s) {
52371
52371
  return "dev";
52372
52372
  }
52373
52373
  function appChannel() {
52374
- return resolveChannel({ isSea: isSea2(), define: true ? "0.9.2" : void 0 });
52374
+ return resolveChannel({ isSea: isSea2(), define: true ? "0.10.0" : void 0 });
52375
52375
  }
52376
52376
 
52377
52377
  // oauth-presets.ts
@@ -52468,6 +52468,45 @@ function bakeFloSource(source, inputs) {
52468
52468
  return doc.toString();
52469
52469
  }
52470
52470
 
52471
+ // report-badge.ts
52472
+ var BADGE_MARKER = "fla-credit";
52473
+ var DEFAULT_URL = "https://floless.io/made-with-floless?utm_source=report_badge";
52474
+ function escapeAttr(value) {
52475
+ return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
52476
+ }
52477
+ function badgeHtml(url) {
52478
+ return `
52479
+ <style>
52480
+ #fla-credit { margin-top: 32px; padding-top: 16px; border-top: 1px solid rgba(0,0,0,0.10); display: flex; justify-content: flex-end; }
52481
+ #fla-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: #161d28; border: 1px solid #2a3548; box-shadow: 0 1px 4px rgba(0,0,0,0.18); text-decoration: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; font-size: 11px; line-height: 1; transition: background 0.15s ease, border-color 0.15s ease; }
52482
+ #fla-badge:hover { background: rgba(74,158,255,0.10); border-color: #2c5f9e; }
52483
+ #fla-badge:focus-visible { outline: 2px solid #4a9eff; outline-offset: 2px; }
52484
+ #fla-badge .fla-prefix { color: #9aa5b6; font-weight: 400; }
52485
+ #fla-badge .fla-name { color: #4a9eff; font-weight: 600; margin-left: 4px; }
52486
+ #fla-badge:hover .fla-name { color: #67b3ff; }
52487
+ @media print { #fla-badge { background: transparent; border-color: #9aa5b6; box-shadow: none; } #fla-badge .fla-prefix { color: #555; } #fla-badge .fla-name { color: #1a56c4; } }
52488
+ </style>
52489
+ <div id="${BADGE_MARKER}">
52490
+ <a id="fla-badge" href="${escapeAttr(url)}" target="_blank" rel="noopener noreferrer" aria-label="Made with FloLess \u2014 visit floless.io">
52491
+ <span class="fla-prefix">Made with</span><span class="fla-name">FloLess</span>
52492
+ </a>
52493
+ </div>`.trim();
52494
+ }
52495
+ function injectBadge(html, opts = {}) {
52496
+ if (!html || !html.trim()) return html;
52497
+ if (html.includes(`id="${BADGE_MARKER}"`)) return html;
52498
+ const badge = badgeHtml(opts.url ?? DEFAULT_URL);
52499
+ let last = -1;
52500
+ for (const m of html.matchAll(/<\/body\s*>/gi)) last = m.index ?? last;
52501
+ return last === -1 ? `${html}
52502
+ ${badge}` : `${html.slice(0, last)}${badge}
52503
+ ${html.slice(last)}`;
52504
+ }
52505
+ function withBadge(report, opts) {
52506
+ if (!report) return report;
52507
+ return { ...report, html: injectBadge(report.html, opts) };
52508
+ }
52509
+
52471
52510
  // index.ts
52472
52511
  var import_node_crypto5 = require("node:crypto");
52473
52512
 
@@ -56866,7 +56905,8 @@ async function startServer() {
56866
56905
  return { id: c.integration, label: friendlyIntegrationName(c.integration) };
56867
56906
  }
56868
56907
  }
56869
- } catch {
56908
+ } catch (err) {
56909
+ console.warn(`[floless] credential-issue detection failed for app "${id}" (treating as no credential issue):`, err);
56870
56910
  }
56871
56911
  return null;
56872
56912
  }
@@ -56907,7 +56947,7 @@ async function startServer() {
56907
56947
  broadcast({ type: "run-started", id, dryRun: !!dryRun, simulate: !!simulate, runId: result.runId });
56908
56948
  for (const ev of events) broadcast({ type: "trace", id, event: ev });
56909
56949
  broadcast({ type: "run-ended", id, runId: result.runId });
56910
- const report = extractReportHtml(events);
56950
+ const report = withBadge(extractReportHtml(events));
56911
56951
  const credentialIssue = !simulate && hasAuthFailure(events) ? await detectCredentialIssue(id) : null;
56912
56952
  return { ok: true, runId: result.runId, tracePath: result.tracePath, events, report, credentialIssue };
56913
56953
  }
@@ -56965,7 +57005,7 @@ async function startServer() {
56965
57005
  broadcast({ type: "debug-ended", id, nodeId });
56966
57006
  const r = result.result ?? {};
56967
57007
  const html = typeof r.html === "string" ? r.html : null;
56968
- return { ok: true, result, report: html ? { nodeId, html } : null };
57008
+ return { ok: true, result, report: withBadge(html ? { nodeId, html } : null) };
56969
57009
  }
56970
57010
  );
56971
57011
  app.get("/api/routines", async () => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floless/app",
3
- "version": "0.9.2",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "description": "Thin localhost host for floless.app — serves web/ and shells the aware CLI. No engine, no LLM.",
6
6
  "bin": {