@olomonhelpdesk2/helpdesk 0.1.10 → 0.1.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.
package/helpdesk.mjs CHANGED
@@ -5,6 +5,26 @@ import { execFileSync } from "node:child_process";
5
5
  import { readFileSync, writeFileSync } from "node:fs";
6
6
  import { join as join2 } from "node:path";
7
7
 
8
+ // core/ci-api.ts
9
+ var CI_TOKEN_NAME = "HELPDESK_TOKEN";
10
+ var CI_WORKFLOW_PATH = ".github/workflows/helpdesk.yml";
11
+ var CAPTURE_WORKFLOW_PATH = ".github/workflows/helpdesk-screenshots.yml";
12
+ function workflowNames(slug) {
13
+ const tag = (slug ?? "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
14
+ if (!tag) {
15
+ return {
16
+ secret: CI_TOKEN_NAME,
17
+ change: { name: "Help desk", path: CI_WORKFLOW_PATH },
18
+ capture: { name: "Help desk screenshots", path: CAPTURE_WORKFLOW_PATH }
19
+ };
20
+ }
21
+ return {
22
+ secret: `${CI_TOKEN_NAME}_${tag.toUpperCase().replace(/-/g, "_")}`,
23
+ change: { name: `Help desk (${tag})`, path: `.github/workflows/helpdesk-${tag}-watch.yml` },
24
+ capture: { name: `Help desk screenshots (${tag})`, path: `.github/workflows/helpdesk-${tag}-screenshots.yml` }
25
+ };
26
+ }
27
+
8
28
  // core/discovery/next-app-router.ts
9
29
  var PAGE_FILE = /(^|\/)page\.(tsx|ts|jsx|js)$/;
10
30
  var LAYOUT_FILE = /(^|\/)layout\.(tsx|ts|jsx|js)$/;
@@ -965,8 +985,13 @@ function hasAnything(facts) {
965
985
  }
966
986
  function describeReading(routes) {
967
987
  const documentable = routes.filter((route) => !route.skipped);
968
- const read = documentable.filter((route) => route.facts && hasAnything(route.facts)).length;
969
- return { screens: documentable.length, read, pathsOnly: read === 0 };
988
+ const read = documentable.filter((route) => route.facts && hasAnything(route.facts));
989
+ return {
990
+ screens: documentable.length,
991
+ read: read.length,
992
+ rendered: read.filter((route) => route.facts?.read?.how === "rendered").length,
993
+ pathsOnly: read.length === 0
994
+ };
970
995
  }
971
996
 
972
997
  // core/github/remote.ts
@@ -1259,6 +1284,8 @@ function headCommit(cwd) {
1259
1284
  return null;
1260
1285
  }
1261
1286
  }
1287
+ var CAPTURE_WORKFLOW = workflowNames().capture;
1288
+ var CI_WORKFLOW = workflowNames().change;
1262
1289
  var WORKFLOW_ACTIONS = {
1263
1290
  checkout: "actions/checkout@v7",
1264
1291
  setupNode: "actions/setup-node@v7"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olomonhelpdesk2/helpdesk",
3
- "version": "0.1.10",
3
+ "version": "0.1.13",
4
4
  "description": "Reads a product's screens, plans its help articles, and photographs them.",
5
5
  "type": "module",
6
6
  "engines": {