@olomonhelpdesk2/helpdesk 0.1.11 → 0.1.14

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)$/;
@@ -1264,6 +1284,8 @@ function headCommit(cwd) {
1264
1284
  return null;
1265
1285
  }
1266
1286
  }
1287
+ var CAPTURE_WORKFLOW = workflowNames().capture;
1288
+ var CI_WORKFLOW = workflowNames().change;
1267
1289
  var WORKFLOW_ACTIONS = {
1268
1290
  checkout: "actions/checkout@v7",
1269
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.11",
3
+ "version": "0.1.14",
4
4
  "description": "Reads a product's screens, plans its help articles, and photographs them.",
5
5
  "type": "module",
6
6
  "engines": {