@sdxc/kit 2026.11.1 → 2026.11.3

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.
Files changed (56) hide show
  1. package/README.md +59 -0
  2. package/changelog.jsonl +257 -0
  3. package/config.schema.json +14 -0
  4. package/dist/ci/install.d.ts +15 -0
  5. package/dist/ci/install.js +27 -0
  6. package/dist/ci/locate.d.ts +23 -0
  7. package/dist/ci/locate.js +43 -0
  8. package/dist/cli.js +5 -0
  9. package/dist/commands/ci/list.d.ts +16 -0
  10. package/dist/commands/ci/list.js +24 -0
  11. package/dist/commands/ci/run.d.ts +65 -0
  12. package/dist/commands/ci/run.js +36 -0
  13. package/dist/commands/ci/signoff.d.ts +15 -0
  14. package/dist/commands/ci/signoff.js +15 -0
  15. package/dist/commands/ci/verify.d.ts +17 -0
  16. package/dist/commands/ci/verify.js +15 -0
  17. package/dist/commands/create.js +3 -0
  18. package/dist/commands/pkg.d.ts +16 -0
  19. package/dist/commands/pkg.js +71 -0
  20. package/dist/commands/routes.d.ts +1 -1
  21. package/dist/config.d.ts +10 -4
  22. package/dist/config.js +8 -0
  23. package/dist/contract.d.ts +60 -1
  24. package/dist/contract.js +46 -0
  25. package/dist/create/workspace.d.ts +15 -0
  26. package/dist/create/workspace.js +42 -0
  27. package/dist/doctor/checks.js +4 -0
  28. package/dist/doctor/ci.d.ts +15 -0
  29. package/dist/doctor/ci.js +63 -0
  30. package/dist/doctor/translations.d.ts +19 -0
  31. package/dist/doctor/translations.js +144 -0
  32. package/dist/package-manager.d.ts +2 -0
  33. package/dist/package-manager.js +16 -2
  34. package/dist/pkg/catalog.d.ts +12 -0
  35. package/dist/pkg/catalog.js +153 -0
  36. package/dist/pkg/resolve.d.ts +67 -0
  37. package/dist/pkg/resolve.js +147 -0
  38. package/dist/upgrade/changelog.d.ts +2 -2
  39. package/dist/upgrade/project.d.ts +2 -2
  40. package/package.json +10 -8
  41. package/registry/ui/banner.json +16 -0
  42. package/registry/ui/confirm.json +8 -4
  43. package/registry/ui/group.json +2 -2
  44. package/registry/ui/input.json +2 -2
  45. package/registry/ui/link-button.json +2 -2
  46. package/registry/ui/property-list.json +18 -0
  47. package/registry/ui/relative-time.json +17 -0
  48. package/registry/ui/status-dot.json +16 -0
  49. package/registry/ui/text-field.json +7 -3
  50. package/registry/ui/timeline.json +16 -0
  51. package/registry/ui/typeset.json +2 -2
  52. package/templates/app/.config/sdxc/ci.ts +26 -0
  53. package/templates/app/.github/workflows/ci.yml +46 -0
  54. package/templates/app/README.md +4 -0
  55. package/templates/app/package.json +1 -0
  56. package/templates/app/public/_headers +4 -0
package/dist/contract.js CHANGED
@@ -6,6 +6,7 @@
6
6
  * @author [Sergio Xalambrí](https://sergiodxa.com)
7
7
  * @copyright Sergio Xalambrí 2026
8
8
  */
9
+ import { LIST_FLAGS, RUN_FLAGS, SIGNOFF_FLAGS, VERIFY_FLAGS } from "@sdxc/ci/command-line";
9
10
  import { argument, command, commands, flag, prompt } from "@sdxc/cli";
10
11
  import * as s from "remix/data-schema";
11
12
  import { BUILTIN_TEMPLATES, DEFAULT_TEMPLATE } from "./create/templates.js";
@@ -79,6 +80,41 @@ const FORCE_FLAG = flag.boolean("force", {
79
80
  });
80
81
  /** Every command `sdxc` takes. */
81
82
  export const SDXC_COMMANDS = commands({
83
+ ci: commands({
84
+ description: "Run the project's CI script (.config/sdxc/ci.ts), and sign green commits off on GitHub",
85
+ flags: {
86
+ ...RUN_FLAGS,
87
+ install: flag.boolean("install", {
88
+ default: true,
89
+ description: "Skip the frozen-lockfile install a local run starts with",
90
+ }),
91
+ },
92
+ list: command({
93
+ description: "Print the steps and matrix entries a fully passing run takes, without running any",
94
+ flags: LIST_FLAGS,
95
+ examples: ["ci list", "ci list --runner remote --matrix Workspaces --json"],
96
+ }),
97
+ signoff: command({
98
+ description: "Post the signoff an earlier green run recorded for a commit already on GitHub",
99
+ arguments: {
100
+ sha: argument(s.string(), {
101
+ optional: true,
102
+ valueName: "sha",
103
+ description: "The commit; HEAD when left out",
104
+ }),
105
+ },
106
+ flags: SIGNOFF_FLAGS,
107
+ examples: ["ci signoff", "ci signoff 1d9090458"],
108
+ }),
109
+ verify: command({
110
+ description: "Exit 0 when a contributor signed the commit off, 1 when nobody did, 2 when GitHub cannot be reached",
111
+ arguments: {
112
+ sha: argument(s.string(), { valueName: "sha", description: "The commit to check" }),
113
+ },
114
+ flags: VERIFY_FLAGS,
115
+ examples: ['ci verify "$GITHUB_SHA" --wait 60s'],
116
+ }),
117
+ }),
82
118
  create: command({
83
119
  description: "Write a new project from a built-in template or a GitHub repository",
84
120
  arguments: {
@@ -574,6 +610,16 @@ export const SDXC_COMMANDS = commands({
574
610
  "routes --except-path /api,/mcp --sort pattern",
575
611
  ],
576
612
  }),
613
+ pkg: command({
614
+ description: "Run an @sdxc package's command line through bunx or npx; with no name, list them",
615
+ arguments: {
616
+ args: argument.rest({
617
+ valueName: "name",
618
+ description: "The package's name, then its command and arguments, passed through as typed",
619
+ }),
620
+ },
621
+ examples: ["pkg", "pkg uuid v7", "pkg jwt decode < token.txt", "pkg email-auth --help"],
622
+ }),
577
623
  run: command({
578
624
  description: "Run the project's own command line (run.entry, default bootstrap/cli.ts)",
579
625
  arguments: {
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Projects created inside a monorepo: a directory below a `package.json` that declares
3
+ * `workspaces` belongs to that repository, whose root owns CI. The template's CI script and
4
+ * GitHub workflows are left out there, so the repository's own CI stays the only one.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { TemplateTree } from "./templates.js";
10
+ /** Template paths a repository root owns, left out of a project created inside a workspace. */
11
+ export declare const ROOT_OWNED_PATHS: readonly string[];
12
+ /** Whether a `package.json` above `directory` declares `workspaces`. */
13
+ export declare function insideWorkspace(directory: string): Promise<boolean>;
14
+ /** Removes every root-owned file and directory from `tree`. */
15
+ export declare function dropRootOwned(tree: TemplateTree): void;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Projects created inside a monorepo: a directory below a `package.json` that declares
3
+ * `workspaces` belongs to that repository, whose root owns CI. The template's CI script and
4
+ * GitHub workflows are left out there, so the repository's own CI stays the only one.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import { readFile } from "node:fs/promises";
10
+ import { dirname, join } from "node:path";
11
+ import { isSuccess, wrap } from "@sdxc/result";
12
+ /** Template paths a repository root owns, left out of a project created inside a workspace. */
13
+ export const ROOT_OWNED_PATHS = [".config/sdxc/ci.ts", ".github/"];
14
+ /** Whether a `package.json` above `directory` declares `workspaces`. */
15
+ export async function insideWorkspace(directory) {
16
+ let current = dirname(directory);
17
+ while (true) {
18
+ let text = await wrap(() => readFile(join(current, "package.json"), "utf8"));
19
+ if (isSuccess(text)) {
20
+ let manifest = wrap(() => JSON.parse(text.data));
21
+ if (isSuccess(manifest) && typeof manifest.data === "object" && manifest.data !== null) {
22
+ if ("workspaces" in manifest.data)
23
+ return true;
24
+ }
25
+ }
26
+ let parent = dirname(current);
27
+ if (parent === current)
28
+ return false;
29
+ current = parent;
30
+ }
31
+ }
32
+ /** Removes every root-owned file and directory from `tree`. */
33
+ export function dropRootOwned(tree) {
34
+ /** Whether `path` is one of the root-owned paths or sits below one. */
35
+ let owned = (path) => ROOT_OWNED_PATHS.some((root) => (root.endsWith("/") ? path.startsWith(root) : path === root));
36
+ for (let path of tree.files.keys())
37
+ if (owned(path))
38
+ tree.files.delete(path);
39
+ for (let path of tree.directories)
40
+ if (owned(`${path}/`) || owned(path))
41
+ tree.directories.delete(path);
42
+ }
@@ -6,6 +6,7 @@
6
6
  * @author [Sergio Xalambrí](https://sergiodxa.com)
7
7
  * @copyright Sergio Xalambrí 2026
8
8
  */
9
+ import { ciCheck } from "./ci.js";
9
10
  import { complexityCheck } from "./complexity.js";
10
11
  import { constantNamesCheck } from "./constant-names.js";
11
12
  import { crapCheck } from "./crap.js";
@@ -33,6 +34,7 @@ import { resultThrowsCheck } from "./result-throws.js";
33
34
  import { routesCheck } from "./routes.js";
34
35
  import { stackImportsCheck } from "./stack-imports.js";
35
36
  import { testRatioCheck } from "./test-ratio.js";
37
+ import { translationsCheck } from "./translations.js";
36
38
  import { typegenCheck } from "./typegen.js";
37
39
  import { uiCheck } from "./ui.js";
38
40
  /**
@@ -46,11 +48,13 @@ export const CHECKS = [
46
48
  remixCheck,
47
49
  envCheck,
48
50
  typegenCheck,
51
+ ciCheck,
49
52
  migrationsCheck,
50
53
  layoutCheck,
51
54
  routesCheck,
52
55
  modelsCheck,
53
56
  emailsCheck,
57
+ translationsCheck,
54
58
  jsdocCheck,
55
59
  complexityCheck,
56
60
  moduleSizeCheck,
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The `ci` check: the project's CI script loads and gives every step a name of its own.
3
+ * `--only`, `--skip` and a CI host's job matrix address steps by name, so two steps sharing
4
+ * one would run, skip or fail together.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { Check } from "./check.js";
10
+ /**
11
+ * Fails when the script cannot load or two steps share an address (a name, prefixed by its
12
+ * matrix entry inside a matrix); skips a project without a script. Steps are listed the way
13
+ * `sdxc ci list` lists them, so nothing runs.
14
+ */
15
+ export declare const ciCheck: Check;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * The `ci` check: the project's CI script loads and gives every step a name of its own.
3
+ * `--only`, `--skip` and a CI host's job matrix address steps by name, so two steps sharing
4
+ * one would run, skip or fail together.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import { stat } from "node:fs/promises";
10
+ import { join } from "node:path";
11
+ import { loadScript, runScript } from "@sdxc/ci";
12
+ import { isFailure, isSuccess, wrap } from "@sdxc/result";
13
+ import { passed, skipped } from "./check.js";
14
+ /**
15
+ * Fails when the script cannot load or two steps share an address (a name, prefixed by its
16
+ * matrix entry inside a matrix); skips a project without a script. Steps are listed the way
17
+ * `sdxc ci list` lists them, so nothing runs.
18
+ */
19
+ export const ciCheck = {
20
+ name: "ci",
21
+ async run(context) {
22
+ let path = context.config.ci.script;
23
+ let found = await wrap(() => stat(join(context.root, path)));
24
+ if (!isSuccess(found) || !found.data.isFile())
25
+ return skipped(`No CI script at ${path}`);
26
+ let loaded = await loadScript(join(context.root, path), context.root);
27
+ if (isFailure(loaded)) {
28
+ return {
29
+ status: "fail",
30
+ message: `${path} does not load as a CI script`,
31
+ findings: [loaded.error.message],
32
+ fix: "Default-export defineCI(async (ci) => { … }) from @sdxc/ci, and install @sdxc/ci",
33
+ };
34
+ }
35
+ let listed = await runScript(loaded.data, {
36
+ root: context.root,
37
+ dryRun: true,
38
+ runner: "local",
39
+ });
40
+ let duplicates = duplicateLabels(listed.steps.map((step) => step.label));
41
+ let errors = listed.errors.map((error) => `${error.where ?? "the script"} threw: ${error.message.split("\n")[0]}`);
42
+ if (errors.length > 0 || duplicates.length > 0) {
43
+ return {
44
+ status: "fail",
45
+ message: `${path} has steps --only and --skip cannot tell apart, or throws while listing`,
46
+ findings: [...duplicates.map((label) => `"${label}" names more than one step`), ...errors],
47
+ fix: "Give each step its own name, such as one including the workspace it checks",
48
+ };
49
+ }
50
+ return passed(`${path} loads, and each of its ${listed.steps.length} steps has its own name`);
51
+ },
52
+ };
53
+ /** Every label that occurs more than once, in first-seen order. */
54
+ function duplicateLabels(labels) {
55
+ let seen = new Set();
56
+ let repeated = new Set();
57
+ for (let label of labels) {
58
+ if (seen.has(label))
59
+ repeated.add(label);
60
+ seen.add(label);
61
+ }
62
+ return [...repeated];
63
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The `translations` check: every bundle in `resources/locales/` is read statically, each message
3
+ * is parsed as MessageFormat 2, and every language's keys are compared with the default
4
+ * language's, so a typo or a forgotten key shows up before a reader sees the fallback.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { Check } from "./check.js";
10
+ /** The folder an app keeps one bundle per language in. */
11
+ export declare const LOCALES_FOLDER = "resources/locales";
12
+ /** The language every other bundle is compared with, when the app ships it. */
13
+ export declare const DEFAULT_LOCALE = "en";
14
+ /**
15
+ * Fails on a message that does not parse as MessageFormat 2, which renders as its key at
16
+ * runtime, and warns on a key one language has and the default language lacks, or the other
17
+ * way round, since a missing key falls back to the default language's copy.
18
+ */
19
+ export declare const translationsCheck: Check;
@@ -0,0 +1,144 @@
1
+ /**
2
+ * The `translations` check: every bundle in `resources/locales/` is read statically, each message
3
+ * is parsed as MessageFormat 2, and every language's keys are compared with the default
4
+ * language's, so a typo or a forgotten key shows up before a reader sees the fallback.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import { readFile } from "node:fs/promises";
10
+ import { join } from "node:path";
11
+ import * as JSONC from "@sdxc/jsonc";
12
+ import { parse } from "@sdxc/messageformat";
13
+ import { isFailure, wrap } from "@sdxc/result";
14
+ import { Project } from "../routes/modules.js";
15
+ import { passed, skipped } from "./check.js";
16
+ import { listFiles } from "./files.js";
17
+ /** The folder an app keeps one bundle per language in. */
18
+ export const LOCALES_FOLDER = "resources/locales";
19
+ /** The language every other bundle is compared with, when the app ships it. */
20
+ export const DEFAULT_LOCALE = "en";
21
+ /** A bundle file directly in the folder, named by its BCP 47 language tag. */
22
+ const BUNDLE_FILE = /^([a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*)\.(?:[cm]?[jt]s|json)$/;
23
+ /**
24
+ * Fails on a message that does not parse as MessageFormat 2, which renders as its key at
25
+ * runtime, and warns on a key one language has and the default language lacks, or the other
26
+ * way round, since a missing key falls back to the default language's copy.
27
+ */
28
+ export const translationsCheck = {
29
+ name: "translations",
30
+ async run(context) {
31
+ let bundles = await readBundles(context.root);
32
+ if (bundles.length === 0)
33
+ return skipped(`No locale bundles in ${LOCALES_FOLDER}`);
34
+ let reference = bundles.find((bundle) => bundle.locale === DEFAULT_LOCALE) ?? bundles[0];
35
+ if (reference === undefined)
36
+ return skipped(`No locale bundles in ${LOCALES_FOLDER}`);
37
+ let invalid = bundles.flatMap(invalidMessages);
38
+ let missing = [];
39
+ let extra = [];
40
+ for (let bundle of bundles) {
41
+ if (bundle === reference)
42
+ continue;
43
+ for (let key of reference.messages.keys()) {
44
+ if (!bundle.messages.has(key))
45
+ missing.push(`${bundle.path} lacks ${key}`);
46
+ }
47
+ for (let key of bundle.messages.keys()) {
48
+ if (!reference.messages.has(key)) {
49
+ extra.push(`${bundle.path} has ${key}, which ${reference.locale} lacks`);
50
+ }
51
+ }
52
+ }
53
+ if (invalid.length > 0) {
54
+ return {
55
+ status: "fail",
56
+ message: `${count(invalid.length, "message")} not valid MessageFormat 2`,
57
+ findings: [...invalid, ...missing, ...extra],
58
+ fix: "Correct each message's syntax; a literal {, } or \\ is escaped with a backslash",
59
+ };
60
+ }
61
+ if (missing.length > 0 || extra.length > 0) {
62
+ let problems = [
63
+ missing.length === 0 ? null : `${count(missing.length, "key")} missing from a translation`,
64
+ extra.length === 0 ? null : `${count(extra.length, "key")} only in a translation`,
65
+ ].filter((problem) => problem !== null);
66
+ return {
67
+ status: "warn",
68
+ message: `Found ${problems.join(" and ")}`,
69
+ findings: [...missing, ...extra],
70
+ fix: `Translate each missing key, and remove or rename each key ${reference.locale} does not have`,
71
+ };
72
+ }
73
+ return passed(`${count(bundles.length, "locale")} with ${count(reference.messages.size, "key")}, every message valid`);
74
+ },
75
+ };
76
+ /** `count` with `noun`, pluralized by an `s` past one. */
77
+ function count(amount, noun) {
78
+ return `${amount} ${noun}${amount === 1 ? "" : "s"}`;
79
+ }
80
+ /**
81
+ * Every bundle directly in {@link LOCALES_FOLDER}, sorted by path. A module's default export is
82
+ * evaluated without running it, following imported sub-bundles; a file that does not read
83
+ * becomes a bundle with no messages.
84
+ */
85
+ async function readBundles(root) {
86
+ let project = new Project(root);
87
+ let bundles = [];
88
+ for (let path of await listFiles(root, LOCALES_FOLDER)) {
89
+ let name = path.slice(LOCALES_FOLDER.length + 1);
90
+ let locale = BUNDLE_FILE.exec(name)?.[1];
91
+ if (locale === undefined)
92
+ continue;
93
+ let messages = new Map();
94
+ if (path.endsWith(".json")) {
95
+ let text = await wrap(() => readFile(join(root, path), "utf8"));
96
+ let parsed = isFailure(text) ? null : JSONC.parse(text.data);
97
+ if (parsed !== null && !isFailure(parsed))
98
+ flattenJSON(parsed.data, "", messages);
99
+ }
100
+ else {
101
+ let module = await project.load(path);
102
+ if (module !== null)
103
+ flattenValue(await project.exportValue(module, "default"), "", messages);
104
+ }
105
+ bundles.push({ locale, path, messages });
106
+ }
107
+ return bundles;
108
+ }
109
+ /** Adds each message under a statically evaluated bundle to `messages` by its dotted key. */
110
+ function flattenValue(value, prefix, messages) {
111
+ if (value.kind !== "map") {
112
+ if (prefix !== "")
113
+ messages.set(prefix, value.kind === "string" ? value.value : null);
114
+ return;
115
+ }
116
+ for (let [key, entry] of value.entries) {
117
+ flattenValue(entry, prefix === "" ? key : `${prefix}.${key}`, messages);
118
+ }
119
+ }
120
+ /** Adds each message under a parsed JSON bundle to `messages` by its dotted key. */
121
+ function flattenJSON(value, prefix, messages) {
122
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
123
+ if (prefix !== "")
124
+ messages.set(prefix, typeof value === "string" ? value : null);
125
+ return;
126
+ }
127
+ for (let [key, entry] of Object.entries(value)) {
128
+ flattenJSON(entry, prefix === "" ? key : `${prefix}.${key}`, messages);
129
+ }
130
+ }
131
+ /** Each message in `bundle` that does not parse, with the parser's reason and offset. */
132
+ function invalidMessages(bundle) {
133
+ let found = [];
134
+ for (let [key, source] of bundle.messages) {
135
+ if (source === null)
136
+ continue;
137
+ let result = parse(source);
138
+ if (!isFailure(result))
139
+ continue;
140
+ let at = result.error.start === undefined ? "" : ` at ${result.error.start}`;
141
+ found.push(`${bundle.path} ${key}: ${result.error.type}${at} (${result.error.message})`);
142
+ }
143
+ return found;
144
+ }
@@ -10,6 +10,8 @@
10
10
  export interface PackageManager {
11
11
  name: "bun" | "npm" | "pnpm" | "yarn";
12
12
  install: string[];
13
+ /** Installs exactly what the lock file pins, failing when it is out of date with a manifest. */
14
+ frozenInstall: string[];
13
15
  /** The command prefix that downloads a package and runs its binary, the package spec appended. */
14
16
  dlx: string[];
15
17
  /** The command prefix that runs a `package.json` script. */
@@ -11,17 +11,31 @@ import { dirname, join } from "node:path";
11
11
  import { isFailure, isSuccess, wrap } from "@sdxc/result";
12
12
  /** The package managers by name, with the commands each one spells. */
13
13
  const PACKAGE_MANAGERS = {
14
- bun: { name: "bun", install: ["bun", "install"], dlx: ["bunx"], run: ["bun", "run"] },
15
- npm: { name: "npm", install: ["npm", "install"], dlx: ["npx", "--yes"], run: ["npm", "run"] },
14
+ bun: {
15
+ name: "bun",
16
+ install: ["bun", "install"],
17
+ frozenInstall: ["bun", "install", "--frozen-lockfile"],
18
+ dlx: ["bunx"],
19
+ run: ["bun", "run"],
20
+ },
21
+ npm: {
22
+ name: "npm",
23
+ install: ["npm", "install"],
24
+ frozenInstall: ["npm", "ci"],
25
+ dlx: ["npx", "--yes"],
26
+ run: ["npm", "run"],
27
+ },
16
28
  pnpm: {
17
29
  name: "pnpm",
18
30
  install: ["pnpm", "install"],
31
+ frozenInstall: ["pnpm", "install", "--frozen-lockfile"],
19
32
  dlx: ["pnpm", "dlx"],
20
33
  run: ["pnpm", "run"],
21
34
  },
22
35
  yarn: {
23
36
  name: "yarn",
24
37
  install: ["yarn", "install"],
38
+ frozenInstall: ["yarn", "install", "--immutable"],
25
39
  dlx: ["yarn", "dlx"],
26
40
  run: ["yarn", "run"],
27
41
  },
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The `@sdxc` packages `sdxc pkg` knows by name: those with a command line, each with what it
3
+ * does for `sdxc pkg --help`, and those without one, so a request for one gets an answer
4
+ * naming where to ask for it. A repository test holds both lists to the published packages.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ /** Every package with a command line, by name, with what its command line does. */
10
+ export declare const PACKAGE_COMMAND_LINES: Readonly<Record<string, string>>;
11
+ /** Every published package without a command line yet. */
12
+ export declare const PACKAGES_WITHOUT_COMMAND_LINES: readonly string[];
@@ -0,0 +1,153 @@
1
+ /**
2
+ * The `@sdxc` packages `sdxc pkg` knows by name: those with a command line, each with what it
3
+ * does for `sdxc pkg --help`, and those without one, so a request for one gets an answer
4
+ * naming where to ask for it. A repository test holds both lists to the published packages.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ /** Every package with a command line, by name, with what its command line does. */
10
+ export const PACKAGE_COMMAND_LINES = {
11
+ ci: "run a CI script locally or on a CI host, and sign green commits off on GitHub",
12
+ cron: "upcoming runs, descriptions and validation for cron schedules",
13
+ crypto: "tokens, digests, MACs, one-time codes and password hashes",
14
+ diagram: "Mermaid sequence, class, state and flowchart diagrams to SVG",
15
+ distill: "extract the article from a web page",
16
+ doh: "typed DNS over HTTPS lookups",
17
+ "email-address": "parse and check email addresses",
18
+ "email-auth": "check a domain's email-authentication DNS policies",
19
+ font: "inspect and subset fonts",
20
+ html: "read a served page by role and accessible name",
21
+ "http-signatures": "sign and verify HTTP message signatures",
22
+ icalendar: "check iCalendar files and expand their recurrences",
23
+ ip: "IPv4 and IPv6 addresses against the IANA special-purpose registries",
24
+ jscalendar: "convert, expand and validate RFC 8984 JSCalendar documents",
25
+ jscontact: "JSContact, vCard and jCard contacts",
26
+ jsdoc: "JSDoc from JavaScript and TypeScript sources as JSON",
27
+ "json-canonical": "RFC 8785 canonical JSON for hashing and signing",
28
+ "json-patch": "apply, diff and validate RFC 6902 JSON Patch documents",
29
+ jsonc: "check JSON with comments and strip it to plain JSON",
30
+ jsonpath: "RFC 9535 JSONPath queries over JSON documents",
31
+ jwt: "decode, verify and sign JSON Web Tokens, and generate their keys",
32
+ "merge-patch": "apply and compute RFC 7396 JSON merge patches",
33
+ openapi: "check OpenAPI 3.1 documents",
34
+ openpgp: "sign and verify with OpenPGP keys, inspect them and generate them",
35
+ qr: "QR codes as SVG or PNG",
36
+ rdap: "domain registration data from the registry, over RDAP",
37
+ robots: "read and evaluate robots.txt (RFC 9309)",
38
+ "security-headers": "audit and parse security response headers",
39
+ semver: "SemVer 2.0.0 validation, comparison and sorting",
40
+ sitemap: "read and check sitemaps",
41
+ typeid: "generate, parse and encode TypeIDs",
42
+ "user-agent": "read User-Agent strings",
43
+ uuid: "generate and validate UUIDs",
44
+ "web-push": "VAPID keys and test notifications for Web Push",
45
+ webmention: "discover, send and verify Webmentions",
46
+ "well-known": "read and check /.well-known/ documents",
47
+ "zone-file": "read, check and write RFC 1035 DNS zone files",
48
+ };
49
+ /** Every published package without a command line yet. */
50
+ export const PACKAGES_WITHOUT_COMMAND_LINES = [
51
+ "activitypub",
52
+ "api-client",
53
+ "assets-middleware",
54
+ "atom",
55
+ "attribution",
56
+ "auth",
57
+ "authz",
58
+ "backoff",
59
+ "billing",
60
+ "bracket-params",
61
+ "cache",
62
+ "captcha",
63
+ "catch-response-middleware",
64
+ "cbor",
65
+ "cli",
66
+ "cloudflare-mocks",
67
+ "cloudflare-pricing",
68
+ "codemod",
69
+ "csv",
70
+ "data-model",
71
+ "data-table-d1",
72
+ "data-table-sqlstorage",
73
+ "database-middleware",
74
+ "dates",
75
+ "digest-fields",
76
+ "duration",
77
+ "epub",
78
+ "expression",
79
+ "feed",
80
+ "file-storage-r2",
81
+ "flags",
82
+ "flags-engine",
83
+ "get-client-ip",
84
+ "health",
85
+ "highlight",
86
+ "honeypot",
87
+ "hostname",
88
+ "http",
89
+ "i18n",
90
+ "icons",
91
+ "idempotency",
92
+ "iife",
93
+ "jmap",
94
+ "jobs",
95
+ "json-feed",
96
+ "json-pointer",
97
+ "json-schema",
98
+ "jsonl",
99
+ "lazy-frame",
100
+ "lazy-route",
101
+ "link-header",
102
+ "location",
103
+ "logger",
104
+ "mail",
105
+ "markdown",
106
+ "math",
107
+ "messageformat",
108
+ "messaging",
109
+ "microformats",
110
+ "micropub",
111
+ "newsletter",
112
+ "no-www-middleware",
113
+ "opml",
114
+ "outbound",
115
+ "pagination",
116
+ "passkey",
117
+ "password-policy",
118
+ "pdf",
119
+ "png",
120
+ "privacy-pass",
121
+ "problem",
122
+ "random",
123
+ "raster",
124
+ "rate-limit",
125
+ "response",
126
+ "result",
127
+ "rss",
128
+ "saml",
129
+ "sample",
130
+ "scim",
131
+ "scitt",
132
+ "search",
133
+ "seo",
134
+ "server-timing",
135
+ "session-storage-kv",
136
+ "spam",
137
+ "strings",
138
+ "structured-fields",
139
+ "trace-context",
140
+ "trailing-slash-middleware",
141
+ "types",
142
+ "u",
143
+ "ui",
144
+ "uri-template",
145
+ "validate",
146
+ "webhooks",
147
+ "websub",
148
+ "workers-cache",
149
+ "x402",
150
+ "xml",
151
+ "yaml",
152
+ "zip",
153
+ ];