@dpuse/dpuse-development 0.3.788 → 0.3.791

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/README.md CHANGED
@@ -79,16 +79,16 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
79
79
  | Chunk/Module/File | Composition |
80
80
  | :----------------------------------------------------------------------------------------------- | :--------------------------- |
81
81
  | dist/dpuse-development.es.js | 44.7 kB · gzip 14.4 kB |
82
- |     src | `██████████░░░░░░░░░░` 52.0% |
83
- |         documentQualitySecurity.ts | `███░░░░░░░░░░░░░░░░░` 13.1% |
82
+ |     src | `██████████░░░░░░░░░░` 51.4% |
83
+ |         documentQualitySecurity.ts | `███░░░░░░░░░░░░░░░░░` 13.0% |
84
84
  |         documentDependencies.ts | `██░░░░░░░░░░░░░░░░░░` 8.1% |
85
- |         documentBundleSizes.ts | `█░░░░░░░░░░░░░░░░░░░` 5.9% |
86
- |         checkConfigFiles.ts | `█░░░░░░░░░░░░░░░░░░░` 4.9% |
85
+ |         documentBundleSizes.ts | `█░░░░░░░░░░░░░░░░░░░` 5.8% |
86
+ |         checkConfigFiles.ts | `█░░░░░░░░░░░░░░░░░░░` 4.8% |
87
87
  |         documentUsage.ts | `█░░░░░░░░░░░░░░░░░░░` 3.6% |
88
88
  |         documentActions.ts | `░░░░░░░░░░░░░░░░░░░░` 2.3% |
89
- |         cloudflare.ts | `░░░░░░░░░░░░░░░░░░░░` 2.1% |
89
+ |         cloudflare.ts | `░░░░░░░░░░░░░░░░░░░░` 2.0% |
90
90
  |         checkDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 2.0% |
91
- |         documentOpening.ts | `░░░░░░░░░░░░░░░░░░░░` 1.7% |
91
+ |         documentOpening.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% |
92
92
  |         documentContributingLicense.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% |
93
93
  |         releaseProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.3% |
94
94
  |         testProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.0% |
@@ -103,16 +103,16 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
103
103
  |         checkProject.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
104
104
  |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 8.0% |
105
105
  | dist/utilities-CPg6O2rR.js | 22.1 kB · gzip 6.1 kB |
106
- |     @dpuse/dpuse-shared | `███░░░░░░░░░░░░░░░░░` 15.0% |
107
- |         dist/componentConfig.schema-DT3mO5rS.js | `██░░░░░░░░░░░░░░░░░░` 11.3% |
108
- |         dist/dpuse-shared-componentModuleConnector.es.js | `█░░░░░░░░░░░░░░░░░░░` 3.1% |
106
+ |     @dpuse/dpuse-shared | `███░░░░░░░░░░░░░░░░░` 14.9% |
107
+ |         dist/componentConfig.schema-DT3mO5rS.js | `██░░░░░░░░░░░░░░░░░░` 11.2% |
108
+ |         dist/dpuse-shared-componentModuleConnector.es.js | `█░░░░░░░░░░░░░░░░░░░` 3.0% |
109
109
  |         dist/moduleConfig.schema-aYmFWSrn.js | `░░░░░░░░░░░░░░░░░░░░` 0.4% |
110
110
  |         dist/dpuse-shared-componentModulePresenter.es.js | `░░░░░░░░░░░░░░░░░░░░` 0.3% |
111
- |     src → index.ts | `██░░░░░░░░░░░░░░░░░░` 10.2% |
111
+ |     src → index.ts | `██░░░░░░░░░░░░░░░░░░` 10.1% |
112
112
  |     (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 3.9% |
113
113
  |     valibot → dist/index.mjs | `░░░░░░░░░░░░░░░░░░░░` 0.5% |
114
- | dist/apiReference-CDT825AK.js | 7.7 kB · gzip 2.8 kB |
115
- |     src → apiReference.ts | `██░░░░░░░░░░░░░░░░░░` 9.8% |
114
+ | dist/apiReference-CnXXTvff.js | 8.4 kB · gzip 3.1 kB |
115
+ |     src → apiReference.ts | `██░░░░░░░░░░░░░░░░░░` 10.6% |
116
116
  |     (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.5% |
117
117
 
118
118
  (bundler output, whitespace & JSON) = bytes Sonda can't trace to a source file: whitespace (indentation and line breaks), code the bundler generates (region comments, the combined import/export lines, its small runtime helper and wrappers), and imported JSON such as `config.json`, which the bundler doesn't map. The JSON and the generated code are real bytes that ship; the whitespace mostly disappears once compressed.
@@ -0,0 +1,211 @@
1
+ import { D as e, _ as t, y as n } from "./utilities-CPg6O2rR.js";
2
+ import r from "node:path";
3
+ import i from "typescript";
4
+ //#region src/utilities/apiReference.ts
5
+ var a = 3, o = "General", s = [
6
+ "Functions",
7
+ "Classes",
8
+ "Constants",
9
+ "Schemas",
10
+ "Types"
11
+ ], c = "Every export, grouped by import path. This file is updated each time `npm run document` is run, and with each release.";
12
+ async function l(a, o) {
13
+ t(`${a} Write '${o}'`);
14
+ let s = u(await n("package.json"));
15
+ if (s.length === 0) throw Error("package.json 'exports' must name at least one import path with types to document the API reference.");
16
+ let l = i.createProgram(s.map(({ sourcePath: e }) => r.resolve(e)), d()), p = l.getTypeChecker(), m = y(l, p), h = s.map(({ importPath: e, sourcePath: t }) => {
17
+ let n = l.getSourceFile(r.resolve(t));
18
+ if (n === void 0) throw Error(`Unable to read '${t}', the source of '${e}'.`);
19
+ return j(e, f(p, n, m));
20
+ });
21
+ await e(o, `# API Reference\n\n${c}\n\n${h.join("\n\n")}\n`);
22
+ }
23
+ function u(e) {
24
+ let t = e.name ?? "", n = e.exports;
25
+ return (typeof n == "object" && n && !Array.isArray(n) ? Object.entries(n) : []).flatMap(([e, n]) => {
26
+ let r = typeof n == "object" && n && !Array.isArray(n) ? n.types : void 0;
27
+ return typeof r == "string" ? [{
28
+ importPath: e === "." ? t : `${t}${e.slice(1)}`,
29
+ sourcePath: r.replace(/^\.\/dist\/types\//, "").replace(/\.d\.ts$/, ".ts")
30
+ }] : [];
31
+ });
32
+ }
33
+ function d() {
34
+ let e = i.findConfigFile(process.cwd(), (e) => i.sys.fileExists(e));
35
+ if (e === void 0) return {
36
+ module: i.ModuleKind.ESNext,
37
+ moduleResolution: i.ModuleResolutionKind.Bundler,
38
+ target: i.ScriptTarget.ESNext
39
+ };
40
+ let { config: t } = i.readConfigFile(e, (e) => i.sys.readFile(e));
41
+ return i.parseJsonConfigFileContent(t, i.sys, process.cwd()).options;
42
+ }
43
+ function f(e, t, n) {
44
+ let r = e.getSymbolAtLocation(t);
45
+ return (r === void 0 ? [] : e.getExportsOfModule(r)).flatMap((t) => {
46
+ let r = E(e, t), i = m(e, D(t, r), r, n);
47
+ return i === void 0 ? [] : [{
48
+ ...i,
49
+ description: h(e, r),
50
+ topic: p(r)
51
+ }];
52
+ }).toSorted((e, t) => e.name.localeCompare(t.name));
53
+ }
54
+ function p(e) {
55
+ let t = e.declarations?.[0]?.getSourceFile().fileName;
56
+ if (t === void 0) return o;
57
+ let n = (e) => i.sys.realpath?.(e) ?? e, a = r.relative(n(r.join(process.cwd(), "src")), n(r.dirname(t)));
58
+ return a === "" || a.startsWith("..") ? o : a.split(r.sep).map((e) => e.replaceAll(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase())).join(" › ");
59
+ }
60
+ function m(e, t, n, r) {
61
+ let [a] = (n.flags & (i.SymbolFlags.Function | i.SymbolFlags.Variable)) === 0 ? [] : e.getSignaturesOfType(e.getTypeOfSymbol(n), i.SignatureKind.Call), o = t.endsWith("Schema");
62
+ return a !== void 0 && !o ? {
63
+ detail: `(${a.parameters.map((t) => O(e, t)).join(", ")})`,
64
+ kind: "Functions",
65
+ name: t,
66
+ origin: ""
67
+ } : (n.flags & i.SymbolFlags.Class) === 0 ? o && (n.flags & i.SymbolFlags.Variable) !== 0 ? {
68
+ detail: "",
69
+ kind: "Schemas",
70
+ name: t,
71
+ origin: ""
72
+ } : (n.flags & i.SymbolFlags.Variable) === 0 ? (n.flags & (i.SymbolFlags.Enum | i.SymbolFlags.Interface | i.SymbolFlags.TypeAlias)) === 0 ? void 0 : {
73
+ detail: "",
74
+ kind: "Types",
75
+ name: t,
76
+ origin: _(e, n, r)
77
+ } : {
78
+ detail: `: ${g(e, n)}`,
79
+ kind: "Constants",
80
+ name: t,
81
+ origin: ""
82
+ } : {
83
+ detail: "",
84
+ kind: "Classes",
85
+ name: t,
86
+ origin: _(e, n, r)
87
+ };
88
+ }
89
+ function h(e, t) {
90
+ let n = i.displayPartsToString(t.getDocumentationComment(e)).replaceAll(/\s+/g, " ").trim();
91
+ return n === "" ? void 0 : n;
92
+ }
93
+ function g(e, t) {
94
+ let n = t.valueDeclaration, r = n !== void 0 && i.isVariableDeclaration(n) ? n : void 0, a = r?.initializer, o = a !== void 0 && i.isAsExpression(a) && !i.isConstTypeReference(a.type), s = r?.type ?? (o ? a.type : void 0);
95
+ return s === void 0 ? e.typeToString(e.getBaseTypeOfLiteralType(e.getTypeOfSymbol(t)), n) : A(s);
96
+ }
97
+ function _(e, t, n) {
98
+ let r = (t.declarations ?? []).flatMap((e) => i.isClassDeclaration(e) || i.isInterfaceDeclaration(e) ? [...e.heritageClauses ?? []] : []).map((e) => `${e.token === i.SyntaxKind.ExtendsKeyword ? "extends" : "implements"} ${e.types.map((e) => F(A(e))).join(", ")}`), a = t.declarations?.find((e) => i.isTypeAliasDeclaration(e)), o = a === void 0 ? void 0 : x(a);
99
+ if (a !== void 0 && o !== void 0) {
100
+ r.push(`inferred from ${F(o.getText())}`);
101
+ let t = S(e, a), i = t === void 0 ? [] : v(e, t, a.name.text, n);
102
+ i.length > 0 && r.push(`extends ${i.map((e) => F(e)).join(", ")}`);
103
+ }
104
+ return r.length === 0 ? "" : ` (${r.join(", ")})`;
105
+ }
106
+ function v(e, t, n, r) {
107
+ return t.properties.flatMap((t) => {
108
+ let a = i.isSpreadAssignment(t) ? w(e, t.expression) : void 0;
109
+ if (a === void 0) return [];
110
+ let o = r.get(a);
111
+ return o === n ? v(e, a, n, r) : o === void 0 ? [] : [o];
112
+ });
113
+ }
114
+ function y(e, t) {
115
+ let n = /* @__PURE__ */ new Map(), r = e.getSourceFiles().filter((t) => !t.isDeclarationFile && !e.isSourceFileFromExternalLibrary(t)).flatMap((e) => e.statements.filter((e) => i.isTypeAliasDeclaration(e)));
116
+ for (let e of r) for (let { addedFieldCount: r, group: i } of b(t, e)) n.set(i, [...n.get(i) ?? [], {
117
+ addedFieldCount: r,
118
+ typeName: e.name.text
119
+ }]);
120
+ let a = /* @__PURE__ */ new Map();
121
+ for (let [e, t] of n) {
122
+ let n = Math.min(...t.map(({ addedFieldCount: e }) => e)), [r, ...i] = t.filter(({ addedFieldCount: e }) => e === n);
123
+ r !== void 0 && i.length === 0 && a.set(e, r.typeName);
124
+ }
125
+ return a;
126
+ }
127
+ function b(e, t) {
128
+ let n = S(e, t);
129
+ if (n === void 0) return [];
130
+ let r = i.isVariableDeclaration(n.parent) ? [{
131
+ addedFieldCount: 0,
132
+ group: n
133
+ }] : [], a = n.properties.flatMap((t) => {
134
+ let r = i.isSpreadAssignment(t) ? w(e, t.expression) : void 0;
135
+ return r === void 0 ? [] : [{
136
+ addedFieldCount: n.properties.length - 1,
137
+ group: r
138
+ }];
139
+ });
140
+ return [...r, ...a];
141
+ }
142
+ function x(e) {
143
+ let [t] = C(e.type, "InferOutput") ? e.type.typeArguments ?? [] : [];
144
+ if (t === void 0) return;
145
+ if (i.isTypeQueryNode(t)) return t.exprName;
146
+ let [n] = C(t, "ReturnType") ? t.typeArguments ?? [] : [], [r] = n !== void 0 && i.isTypeQueryNode(n) ? n.typeArguments ?? [] : [];
147
+ return r !== void 0 && i.isTypeQueryNode(r) ? r.exprName : void 0;
148
+ }
149
+ function S(e, t) {
150
+ let n = x(t), r = n === void 0 ? void 0 : T(e, n);
151
+ if (r === void 0) return;
152
+ if (i.isObjectLiteralExpression(r)) return r;
153
+ let [a] = i.isCallExpression(r) ? r.arguments : [];
154
+ return a === void 0 ? void 0 : w(e, a);
155
+ }
156
+ function C(e, t) {
157
+ return i.isTypeReferenceNode(e) ? (i.isQualifiedName(e.typeName) ? e.typeName.right : e.typeName).text === t : !1;
158
+ }
159
+ function w(e, t) {
160
+ if (i.isObjectLiteralExpression(t)) return t;
161
+ let n = T(e, t);
162
+ return n !== void 0 && i.isObjectLiteralExpression(n) ? n : void 0;
163
+ }
164
+ function T(e, t) {
165
+ let n = e.getSymbolAtLocation(t), r = n === void 0 ? void 0 : E(e, n).valueDeclaration;
166
+ return r !== void 0 && i.isVariableDeclaration(r) ? r.initializer : void 0;
167
+ }
168
+ function E(e, t) {
169
+ return (t.flags & i.SymbolFlags.Alias) === 0 ? t : e.getAliasedSymbol(t);
170
+ }
171
+ function D(e, t) {
172
+ if (e.name !== "default") return e.name;
173
+ let n = t.declarations?.map((e) => i.getNameOfDeclaration(e)?.getText()).find((e) => e !== void 0);
174
+ return n === void 0 || n === "default" ? "default" : `default (${n})`;
175
+ }
176
+ function O(e, t) {
177
+ let n = t.valueDeclaration, r = n !== void 0 && i.isParameter(n) ? n : void 0, a = r?.questionToken !== void 0 || r?.initializer !== void 0, o = r?.type === void 0 ? e.typeToString(e.getTypeOfSymbol(t), n) : A(r.type);
178
+ return `${r === void 0 ? t.name : k(r.name)}${a ? "?" : ""}: ${o}`;
179
+ }
180
+ function k(e) {
181
+ if (i.isIdentifier(e)) return e.text;
182
+ let t = e.elements.flatMap((e) => i.isBindingElement(e) ? [(e.dotDotDotToken === void 0 ? "" : "...") + k(e.name)] : []);
183
+ return i.isObjectBindingPattern(e) ? `{ ${t.join(", ")} }` : `[${t.join(", ")}]`;
184
+ }
185
+ function A(e) {
186
+ return e.getText().replaceAll(/\s+/g, " ");
187
+ }
188
+ function j(e, t) {
189
+ let n = [...new Set(t.map((e) => e.topic))].toSorted(M);
190
+ if (n.length < a) return [`## ${e}`, ...N(t, "###")].join("\n\n");
191
+ let r = n.map((e) => [`### ${e}`, ...N(t.filter((t) => t.topic === e), "####")].join("\n\n"));
192
+ return [`## ${e}`, ...r].join("\n\n");
193
+ }
194
+ function M(e, t) {
195
+ return e === o || t === o ? Number(t === o) - Number(e === o) : e.localeCompare(t);
196
+ }
197
+ function N(e, t) {
198
+ return s.flatMap((n) => {
199
+ let r = e.filter((e) => e.kind === n).map((e) => P(e));
200
+ return r.length === 0 ? [] : [`${t} ${n}\n\n${r.join("\n")}`];
201
+ });
202
+ }
203
+ function P({ description: e, detail: t, name: n, origin: r }) {
204
+ let i = t === "" ? "" : F(t), a = `- **${F(n)}**${i}${r}`;
205
+ return e === void 0 ? a : `${a}\n > ${e}`;
206
+ }
207
+ function F(e) {
208
+ return `\`${e}\``;
209
+ }
210
+ //#endregion
211
+ export { l as writeAPIReference };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiReference-CnXXTvff.js","names":[],"sources":["../src/utilities/apiReference.ts"],"sourcesContent":["// ── External Dependencies & Registrations\nimport type { PackageJson } from 'type-fest';\nimport path from 'node:path';\nimport ts from 'typescript';\n\n// ── Local Framework\nimport { logStepHeader, readJSONFile, writeTextFile } from '@/utilities';\n\n// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\ninterface ExportEntry {\n description: string | undefined;\n detail: string; // What follows the name in code, such as a function's parameters or a constant's type.\n kind: ExportKind;\n name: string;\n origin: string;\n topic: string; // The folder the export is declared in, such as 'Component › Module › Connector'.\n}\n\ntype ExportKind = 'Classes' | 'Constants' | 'Functions' | 'Schemas' | 'Types';\n\n// ── Constants ────────────────────────────────────────────────────────────────────────────────────────────────────────\n\n// An import path whose exports come from at least this many folders is listed by folder, so a package with one entry\n// point for everything still reads as topics rather than one long list.\nconst TOPIC_GROUPING_MINIMUM = 3;\n\n// Declared directly in the source folder, rather than in a topic folder within it.\nconst GENERAL_TOPIC = 'General';\n\n// In the order each import path's section lists them.\nconst EXPORT_KINDS: ExportKind[] = ['Functions', 'Classes', 'Constants', 'Schemas', 'Types'];\n\nconst API_REFERENCE_INTRO = 'Every export, grouped by import path. This file is updated each time `npm run document` is run, and with each release.';\n\n// ── Actions ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\n// Lists the exports of each import path in package.json 'exports', read from the TypeScript source the path's types are\n// built from. Paths without types, such as a shared config file, are left out. This module is loaded only when the API\n// reference is written, as TypeScript is an optional peer.\nexport async function writeAPIReference(stepIcon: string, apiReferencePath: string): Promise<void> {\n logStepHeader(`${stepIcon} Write '${apiReferencePath}'`);\n\n const packageJSON = await readJSONFile<PackageJson>('package.json');\n const entryPoints = resolveEntryPoints(packageJSON);\n if (entryPoints.length === 0) throw new Error(\"package.json 'exports' must name at least one import path with types to document the API reference.\");\n\n // Absolute paths, as TypeScript keeps the working directory it first saw, so relative ones could resolve against a\n // folder the process has since left.\n const program = ts.createProgram(\n entryPoints.map(({ sourcePath }) => path.resolve(sourcePath)),\n readCompilerOptions()\n );\n const checker = program.getTypeChecker();\n const fieldGroupOwners = mapFieldGroupOwners(program, checker);\n\n const sections = entryPoints.map(({ importPath, sourcePath }) => {\n const sourceFile = program.getSourceFile(path.resolve(sourcePath));\n if (sourceFile === undefined) throw new Error(`Unable to read '${sourcePath}', the source of '${importPath}'.`);\n return buildSection(importPath, listExports(checker, sourceFile, fieldGroupOwners));\n });\n\n await writeTextFile(apiReferencePath, `# API Reference\\n\\n${API_REFERENCE_INTRO}\\n\\n${sections.join('\\n\\n')}\\n`);\n}\n\n// ── Helpers ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\n// The types path of each export, such as './dist/types/src/errors/index.d.ts', mirrors its source file\n// ('src/errors/index.ts'), so the source is found by stripping the output folder and swapping the extension.\nfunction resolveEntryPoints(packageJSON: PackageJson): { importPath: string; sourcePath: string }[] {\n const packageName = packageJSON.name ?? '';\n const exportsField = packageJSON.exports;\n const exportEntries = exportsField != null && typeof exportsField === 'object' && !Array.isArray(exportsField) ? Object.entries(exportsField) : [];\n\n return exportEntries.flatMap(([subpath, target]) => {\n const typesPath = target != null && typeof target === 'object' && !Array.isArray(target) ? target['types'] : undefined;\n if (typeof typesPath !== 'string') return [];\n const importPath = subpath === '.' ? packageName : `${packageName}${subpath.slice(1)}`;\n const sourcePath = typesPath.replace(/^\\.\\/dist\\/types\\//, '').replace(/\\.d\\.ts$/, '.ts');\n return [{ importPath, sourcePath }];\n });\n}\n\n// Uses the project's own tsconfig, so '@/' and other path aliases resolve as they do in the build.\nfunction readCompilerOptions(): ts.CompilerOptions {\n const configPath = ts.findConfigFile(process.cwd(), (fileName) => ts.sys.fileExists(fileName));\n if (configPath === undefined) return { module: ts.ModuleKind.ESNext, moduleResolution: ts.ModuleResolutionKind.Bundler, target: ts.ScriptTarget.ESNext };\n\n const { config } = ts.readConfigFile(configPath, (fileName) => ts.sys.readFile(fileName)) as { config: unknown };\n return ts.parseJsonConfigFileContent(config, ts.sys, process.cwd()).options;\n}\n\nfunction listExports(checker: ts.TypeChecker, sourceFile: ts.SourceFile, fieldGroupOwners: Map<ts.ObjectLiteralExpression, string>): ExportEntry[] {\n const moduleSymbol = checker.getSymbolAtLocation(sourceFile);\n const exportedSymbols = moduleSymbol === undefined ? [] : checker.getExportsOfModule(moduleSymbol);\n\n const entries = exportedSymbols.flatMap((exportedSymbol) => {\n const symbol = resolveAlias(checker, exportedSymbol);\n const entry = describeExport(checker, formatExportName(exportedSymbol, symbol), symbol, fieldGroupOwners);\n return entry === undefined ? [] : [{ ...entry, description: readDescription(checker, symbol), topic: readTopic(symbol) }];\n });\n return entries.toSorted((a, b) => a.name.localeCompare(b.name));\n}\n\n// Named from the folders between 'src' and the file declaring the export: 'component/module/connector' reads as\n// 'Component › Module › Connector', with camel-case names split into words.\nfunction readTopic(symbol: ts.Symbol): string {\n const fileName = symbol.declarations?.[0]?.getSourceFile().fileName;\n if (fileName === undefined) return GENERAL_TOPIC;\n\n // TypeScript reports files with symbolic links resolved (on macOS, '/var' is really '/private/var'), so the source\n // folder is resolved the same way before the two are compared.\n const resolvePath = (unresolvedPath: string): string => ts.sys.realpath?.(unresolvedPath) ?? unresolvedPath;\n const folder = path.relative(resolvePath(path.join(process.cwd(), 'src')), resolvePath(path.dirname(fileName)));\n return folder === '' || folder.startsWith('..')\n ? GENERAL_TOPIC\n : folder\n .split(path.sep)\n .map((segment) => segment.replaceAll(/([a-z])([A-Z])/g, '$1 $2').replace(/^./, (letter) => letter.toUpperCase()))\n .join(' › ');\n}\n\n// Functions include constants holding a function, as with arrow functions. Schemas are the constants named '…Schema'.\nfunction describeExport(\n checker: ts.TypeChecker,\n name: string,\n symbol: ts.Symbol,\n fieldGroupOwners: Map<ts.ObjectLiteralExpression, string>\n): Omit<ExportEntry, 'description' | 'topic'> | undefined {\n const isValue = (symbol.flags & (ts.SymbolFlags.Function | ts.SymbolFlags.Variable)) !== 0;\n const [signature] = isValue ? checker.getSignaturesOfType(checker.getTypeOfSymbol(symbol), ts.SignatureKind.Call) : [];\n const isSchema = name.endsWith('Schema');\n\n if (signature !== undefined && !isSchema) {\n const parameters = signature.parameters.map((parameter) => formatParameter(checker, parameter));\n return { detail: `(${parameters.join(', ')})`, kind: 'Functions', name, origin: '' };\n }\n if ((symbol.flags & ts.SymbolFlags.Class) !== 0) return { detail: '', kind: 'Classes', name, origin: formatOrigin(checker, symbol, fieldGroupOwners) };\n if (isSchema && (symbol.flags & ts.SymbolFlags.Variable) !== 0) return { detail: '', kind: 'Schemas', name, origin: '' };\n if ((symbol.flags & ts.SymbolFlags.Variable) !== 0) return { detail: `: ${formatConstantType(checker, symbol)}`, kind: 'Constants', name, origin: '' };\n const isType = (symbol.flags & (ts.SymbolFlags.Enum | ts.SymbolFlags.Interface | ts.SymbolFlags.TypeAlias)) !== 0;\n return isType ? { detail: '', kind: 'Types', name, origin: formatOrigin(checker, symbol, fieldGroupOwners) } : undefined;\n}\n\n// The summary of the '/** … */' comment above the item, on one line. Tags such as '@param' are left out, and '//'\n// comments, which are notes for maintainers, are never read.\nfunction readDescription(checker: ts.TypeChecker, symbol: ts.Symbol): string | undefined {\n const description = ts.displayPartsToString(symbol.getDocumentationComment(checker)).replaceAll(/\\s+/g, ' ').trim();\n return description === '' ? undefined : description;\n}\n\n// The type as written, on the declaration or in an 'as' on its value, which keeps the names it was written with. Where\n// none is written, the inferred type is widened, so 'MAX_COUNT = 3' reads as 'number' rather than '3'.\nfunction formatConstantType(checker: ts.TypeChecker, symbol: ts.Symbol): string {\n const declaration = symbol.valueDeclaration;\n const variableDeclaration = declaration !== undefined && ts.isVariableDeclaration(declaration) ? declaration : undefined;\n const initializer = variableDeclaration?.initializer;\n const isWrittenAs = initializer !== undefined && ts.isAsExpression(initializer) && !ts.isConstTypeReference(initializer.type); // 'as const' names no type.\n const typeNode = variableDeclaration?.type ?? (isWrittenAs ? initializer.type : undefined);\n return typeNode === undefined ? checker.typeToString(checker.getBaseTypeOfLiteralType(checker.getTypeOfSymbol(symbol)), declaration) : formatTypeNode(typeNode);\n}\n\n// What a type or class comes from: the schema it is inferred from, and what it extends or implements, such as\n// ' (extends DPUseError)'. A type inferred from a schema has no 'extends' clause, so its parent is found from the schema\n// instead. The parent is named even when it is not exported, as it is still what the type inherits from.\nfunction formatOrigin(checker: ts.TypeChecker, symbol: ts.Symbol, fieldGroupOwners: Map<ts.ObjectLiteralExpression, string>): string {\n const heritageClauses = (symbol.declarations ?? []).flatMap((declaration) =>\n ts.isClassDeclaration(declaration) || ts.isInterfaceDeclaration(declaration) ? [...(declaration.heritageClauses ?? [])] : []\n );\n const clauses = heritageClauses.map((clause) => {\n const keyword = clause.token === ts.SyntaxKind.ExtendsKeyword ? 'extends' : 'implements';\n return `${keyword} ${clause.types.map((type) => formatCode(formatTypeNode(type))).join(', ')}`;\n });\n\n const typeAlias = symbol.declarations?.find((declaration) => ts.isTypeAliasDeclaration(declaration));\n const schemaName = typeAlias === undefined ? undefined : findSchemaName(typeAlias);\n if (typeAlias !== undefined && schemaName !== undefined) {\n clauses.push(`inferred from ${formatCode(schemaName.getText())}`);\n const fields = findSchemaFields(checker, typeAlias);\n const parents = fields === undefined ? [] : findSchemaParents(checker, fields, typeAlias.name.text, fieldGroupOwners);\n if (parents.length > 0) clauses.push(`extends ${parents.map((parent) => formatCode(parent)).join(', ')}`);\n }\n return clauses.length === 0 ? '' : ` (${clauses.join(', ')})`;\n}\n\n// A schema inherits by spreading in a group of fields, as in 'strictObject({ ...moduleConfigCoreFields, … })'. Where\n// the type owns the group it spreads, as 'ModuleConfig' owns 'moduleConfigCoreFields', its parent is found in that\n// group's own spreads.\nfunction findSchemaParents(checker: ts.TypeChecker, fields: ts.ObjectLiteralExpression, typeName: string, fieldGroupOwners: Map<ts.ObjectLiteralExpression, string>): string[] {\n return fields.properties.flatMap((property) => {\n const group = ts.isSpreadAssignment(property) ? resolveObjectLiteral(checker, property.expression) : undefined;\n if (group === undefined) return [];\n const owner = fieldGroupOwners.get(group);\n if (owner === typeName) return findSchemaParents(checker, group, typeName, fieldGroupOwners);\n return owner === undefined ? [] : [owner];\n });\n}\n\n// A field group is not a type, so it is named by the type whose schema adds the fewest fields to it. Where two types\n// tie, the group is left unnamed rather than guessed at.\nfunction mapFieldGroupOwners(program: ts.Program, checker: ts.TypeChecker): Map<ts.ObjectLiteralExpression, string> {\n const candidates = new Map<ts.ObjectLiteralExpression, { addedFieldCount: number; typeName: string }[]>();\n const typeAliases = program\n .getSourceFiles()\n .filter((sourceFile) => !sourceFile.isDeclarationFile && !program.isSourceFileFromExternalLibrary(sourceFile))\n .flatMap((sourceFile) => sourceFile.statements.filter((statement) => ts.isTypeAliasDeclaration(statement)));\n\n for (const typeAlias of typeAliases) {\n for (const { addedFieldCount, group } of listFieldGroups(checker, typeAlias)) {\n candidates.set(group, [...(candidates.get(group) ?? []), { addedFieldCount, typeName: typeAlias.name.text }]);\n }\n }\n\n const owners = new Map<ts.ObjectLiteralExpression, string>();\n for (const [group, groupCandidates] of candidates) {\n const fewestAdded = Math.min(...groupCandidates.map(({ addedFieldCount }) => addedFieldCount));\n const [owner, ...tied] = groupCandidates.filter(({ addedFieldCount }) => addedFieldCount === fewestAdded);\n if (owner !== undefined && tied.length === 0) owners.set(group, owner.typeName);\n }\n return owners;\n}\n\n// Each field group a type's schema is built from, with the number of fields the schema adds to it.\nfunction listFieldGroups(checker: ts.TypeChecker, typeAlias: ts.TypeAliasDeclaration): { addedFieldCount: number; group: ts.ObjectLiteralExpression }[] {\n const fields = findSchemaFields(checker, typeAlias);\n if (fields === undefined) return [];\n\n // Fields declared under a name of their own, rather than written inside the schema, are a group themselves.\n const ownGroup = ts.isVariableDeclaration(fields.parent) ? [{ addedFieldCount: 0, group: fields }] : [];\n const spreadGroups = fields.properties.flatMap((property) => {\n const group = ts.isSpreadAssignment(property) ? resolveObjectLiteral(checker, property.expression) : undefined;\n return group === undefined ? [] : [{ addedFieldCount: fields.properties.length - 1, group }];\n });\n return [...ownGroup, ...spreadGroups];\n}\n\n// The schema a type is inferred from, written either as 'InferOutput<typeof schema>' or, where the schema is built in\n// place from a group of fields, as 'InferOutput<ReturnType<typeof strictObject<typeof fields>>>'.\nfunction findSchemaName(typeAlias: ts.TypeAliasDeclaration): ts.EntityName | undefined {\n const [argument] = isTypeReferenceNamed(typeAlias.type, 'InferOutput') ? (typeAlias.type.typeArguments ?? []) : [];\n if (argument === undefined) return undefined;\n if (ts.isTypeQueryNode(argument)) return argument.exprName;\n\n const [returnTypeArgument] = isTypeReferenceNamed(argument, 'ReturnType') ? (argument.typeArguments ?? []) : [];\n const [fieldsQuery] = returnTypeArgument !== undefined && ts.isTypeQueryNode(returnTypeArgument) ? (returnTypeArgument.typeArguments ?? []) : [];\n return fieldsQuery !== undefined && ts.isTypeQueryNode(fieldsQuery) ? fieldsQuery.exprName : undefined;\n}\n\n// The fields of the schema a type is inferred from: those passed to 'strictObject({ … })', or the group of fields itself.\nfunction findSchemaFields(checker: ts.TypeChecker, typeAlias: ts.TypeAliasDeclaration): ts.ObjectLiteralExpression | undefined {\n const schemaName = findSchemaName(typeAlias);\n const schema = schemaName === undefined ? undefined : resolveInitializer(checker, schemaName);\n if (schema === undefined) return undefined;\n if (ts.isObjectLiteralExpression(schema)) return schema;\n\n const [fields] = ts.isCallExpression(schema) ? schema.arguments : [];\n return fields === undefined ? undefined : resolveObjectLiteral(checker, fields);\n}\n\nfunction isTypeReferenceNamed(node: ts.TypeNode, name: string): node is ts.TypeReferenceNode {\n if (!ts.isTypeReferenceNode(node)) return false;\n const typeName = ts.isQualifiedName(node.typeName) ? node.typeName.right : node.typeName;\n return typeName.text === name;\n}\n\nfunction resolveObjectLiteral(checker: ts.TypeChecker, node: ts.Node): ts.ObjectLiteralExpression | undefined {\n if (ts.isObjectLiteralExpression(node)) return node;\n const initializer = resolveInitializer(checker, node);\n return initializer !== undefined && ts.isObjectLiteralExpression(initializer) ? initializer : undefined;\n}\n\n// The value a name was declared with, following imports back to the declaration.\nfunction resolveInitializer(checker: ts.TypeChecker, name: ts.Node): ts.Expression | undefined {\n const symbol = checker.getSymbolAtLocation(name);\n const declaration = symbol === undefined ? undefined : resolveAlias(checker, symbol).valueDeclaration;\n return declaration !== undefined && ts.isVariableDeclaration(declaration) ? declaration.initializer : undefined;\n}\n\nfunction resolveAlias(checker: ts.TypeChecker, symbol: ts.Symbol): ts.Symbol {\n return (symbol.flags & ts.SymbolFlags.Alias) === 0 ? symbol : checker.getAliasedSymbol(symbol);\n}\n\n// A default export is imported under any name, so the name it has where it is declared is shown alongside.\nfunction formatExportName(exportedSymbol: ts.Symbol, symbol: ts.Symbol): string {\n if (exportedSymbol.name !== 'default') return exportedSymbol.name;\n const declarationName = symbol.declarations?.map((declaration) => ts.getNameOfDeclaration(declaration)?.getText()).find((name) => name !== undefined);\n return declarationName === undefined || declarationName === 'default' ? 'default' : `default (${declarationName})`;\n}\n\n// A parameter that can be left out, being optional or having a default, is marked with '?'. Its type is as written, or\n// inferred where none is, as with a default value.\nfunction formatParameter(checker: ts.TypeChecker, parameter: ts.Symbol): string {\n const declaration = parameter.valueDeclaration;\n const parameterDeclaration = declaration !== undefined && ts.isParameter(declaration) ? declaration : undefined;\n const isOptional = parameterDeclaration?.questionToken !== undefined || parameterDeclaration?.initializer !== undefined;\n const typeText = parameterDeclaration?.type === undefined ? checker.typeToString(checker.getTypeOfSymbol(parameter), declaration) : formatTypeNode(parameterDeclaration.type);\n const name = parameterDeclaration === undefined ? parameter.name : formatParameterName(parameterDeclaration.name);\n return `${name}${isOptional ? '?' : ''}: ${typeText}`;\n}\n\n// A destructured parameter has no name of its own, so TypeScript calls it '__0'. It is shown by the names it unpacks\n// instead, as '{ allowedLicenses, moduleLevel }', leaving out their defaults.\nfunction formatParameterName(name: ts.BindingName): string {\n if (ts.isIdentifier(name)) return name.text;\n const names = name.elements.flatMap((element) =>\n ts.isBindingElement(element) ? [(element.dotDotDotToken === undefined ? '' : '...') + formatParameterName(element.name)] : []\n );\n return ts.isObjectBindingPattern(name) ? `{ ${names.join(', ')} }` : `[${names.join(', ')}]`;\n}\n\n// A type written across several lines is shown on one.\nfunction formatTypeNode(typeNode: ts.TypeNode): string {\n return typeNode.getText().replaceAll(/\\s+/g, ' ');\n}\n\nfunction buildSection(importPath: string, entries: ExportEntry[]): string {\n const topics = [...new Set(entries.map((entry) => entry.topic))].toSorted(compareTopics);\n if (topics.length < TOPIC_GROUPING_MINIMUM) return [`## ${importPath}`, ...buildKindLists(entries, '###')].join('\\n\\n');\n\n const topicSections = topics.map((topic) =>\n [\n `### ${topic}`,\n ...buildKindLists(\n entries.filter((entry) => entry.topic === topic),\n '####'\n )\n ].join('\\n\\n')\n );\n return [`## ${importPath}`, ...topicSections].join('\\n\\n');\n}\n\n// General comes first, as it holds what the whole package shares; the rest are alphabetical.\nfunction compareTopics(a: string, b: string): number {\n const isEitherGeneral = a === GENERAL_TOPIC || b === GENERAL_TOPIC;\n return isEitherGeneral ? Number(b === GENERAL_TOPIC) - Number(a === GENERAL_TOPIC) : a.localeCompare(b);\n}\n\nfunction buildKindLists(entries: ExportEntry[], headingLevel: string): string[] {\n return EXPORT_KINDS.flatMap((kind) => {\n const items = entries.filter((entry) => entry.kind === kind).map((entry) => formatEntry(entry));\n return items.length === 0 ? [] : [`${headingLevel} ${kind}\\n\\n${items.join('\\n')}`];\n });\n}\n\n// The name and what follows it are code, shown on a shaded background, with only the name bold so it stands out from\n// its parameters or type. The description is a quote nested in the item, which indents every line of it and shows it\n// in lighter text, so the names can be read straight down the left.\nfunction formatEntry({ description, detail, name, origin }: ExportEntry): string {\n const detailCode = detail === '' ? '' : formatCode(detail);\n const firstLine = `- **${formatCode(name)}**${detailCode}${origin}`;\n return description === undefined ? firstLine : `${firstLine}\\n > ${description}`;\n}\n\nfunction formatCode(text: string): string {\n return `\\`${text}\\``;\n}\n"],"mappings":";;;;AAyBA,IAAM,IAAyB,GAGzB,IAAgB,WAGhB,IAA6B;CAAC;CAAa;CAAW;CAAa;CAAW;AAAO,GAErF,IAAsB;AAO5B,eAAsB,EAAkB,GAAkB,GAAyC;CAC/F,EAAc,GAAG,EAAS,UAAU,EAAiB,EAAE;CAGvD,IAAM,IAAc,EAAmB,MADb,EAA0B,cAAc,CAChB;CAClD,IAAI,EAAY,WAAW,GAAG,MAAU,MAAM,qGAAqG;CAInJ,IAAM,IAAU,EAAG,cACf,EAAY,KAAK,EAAE,oBAAiB,EAAK,QAAQ,CAAU,CAAC,GAC5D,EAAoB,CACxB,GACM,IAAU,EAAQ,eAAe,GACjC,IAAmB,EAAoB,GAAS,CAAO,GAEvD,IAAW,EAAY,KAAK,EAAE,eAAY,oBAAiB;EAC7D,IAAM,IAAa,EAAQ,cAAc,EAAK,QAAQ,CAAU,CAAC;EACjE,IAAI,MAAe,KAAA,GAAW,MAAU,MAAM,mBAAmB,EAAW,oBAAoB,EAAW,GAAG;EAC9G,OAAO,EAAa,GAAY,EAAY,GAAS,GAAY,CAAgB,CAAC;CACtF,CAAC;CAED,MAAM,EAAc,GAAkB,sBAAsB,EAAoB,MAAM,EAAS,KAAK,MAAM,EAAE,GAAG;AACnH;AAMA,SAAS,EAAmB,GAAwE;CAChG,IAAM,IAAc,EAAY,QAAQ,IAClC,IAAe,EAAY;CAGjC,QAF8C,OAAO,KAAiB,YAAhD,KAA4D,CAAC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File 'vite.config.ts' is UNIQUE to this project");
74
73
  else {
75
74
  let n;
@@ -696,7 +695,7 @@ var H = "API_REFERENCE.md";
696
695
  async function Dt() {
697
696
  try {
698
697
  f("Document API Reference");
699
- let { writeAPIReference: e } = await import("./apiReference-CDT825AK.js");
698
+ let { writeAPIReference: e } = await import("./apiReference-CnXXTvff.js");
700
699
  await e("1️⃣ ", H), d("API reference documented");
701
700
  } catch (e) {
702
701
  console.error("❌ Error documenting API reference", e), process.exit(1);
@@ -828,7 +827,7 @@ function Ut(e) {
828
827
  }
829
828
  //#endregion
830
829
  //#region src/actions/documentProject.ts
831
- async function Wt({ allowedLicenses: t = "MIT", moduleLevel: n = !1 } = {}) {
830
+ async function Wt(t = "MIT", n = !1) {
832
831
  try {
833
832
  let r = await C("config.json"), i = v(r.id).typeId === "connector";
834
833
  await qe(), i && await ke(), await St(), await Fe(t), await S("bundle-analysis-reports/sonda/index.json") === null ? a(`ℹ️ Bundle sizes NOT documented, as there is no '${U}' yet. Build the project first.`) : await Mt({ moduleLevel: n }), await it(), await Ae();
@@ -953,22 +952,22 @@ async function $(e, t, n, r) {
953
952
  }
954
953
  //#endregion
955
954
  //#region src/actions/releaseProject.ts
956
- async function Qt(t = {}) {
955
+ async function Qt(t = "MIT", n = !1) {
957
956
  try {
958
957
  f("Release Project");
959
- let n = await C("package.json"), r = await C("config.json"), i = v(r.id);
960
- await h("1️⃣ ", n);
961
- let o = await c("2️⃣ ", n, i);
962
- if (await e("3️⃣ Bundle project", "vite", ["build"]), a("4️⃣ Regenerate README"), await Wt(t), await l("5️⃣ Stage changes", "git", ["add", "."]), await l("6️⃣ Commit changes", "git", [
958
+ let r = await C("package.json"), i = await C("config.json"), o = v(i.id);
959
+ await h("1️⃣ ", r);
960
+ let s = await c("2️⃣ ", r, o);
961
+ if (await e("3️⃣ Bundle project", "vite", ["build"]), a("4️⃣ Regenerate README"), await Wt(t, n), await l("5️⃣ Stage changes", "git", ["add", "."]), await l("6️⃣ Commit changes", "git", [
963
962
  "commit",
964
963
  "-m",
965
- `v${n.version ?? "unknown"}`
964
+ `v${r.version ?? "unknown"}`
966
965
  ]), await l("7️⃣ Push changes", "git", [
967
966
  "push",
968
967
  "origin",
969
968
  "main:main"
970
- ]), await $("8️⃣ ", n, o, i), i.publishedTo === "npm") {
971
- let t = `v${n.version ?? "unknown"}`;
969
+ ]), await $("8️⃣ ", r, s, o), o.publishedTo === "npm") {
970
+ let t = `v${r.version ?? "unknown"}`;
972
971
  await e("9️⃣ Create GitHub release", "gh", [
973
972
  "release",
974
973
  "create",
@@ -978,8 +977,8 @@ async function Qt(t = {}) {
978
977
  "--generate-notes",
979
978
  "--latest"
980
979
  ]);
981
- } else a(`9️⃣ Publishing NOT required for package with type identifier of '${i.typeId}'.`);
982
- d(`Project version '${n.version ?? "unknown"}' released.`);
980
+ } else a(`9️⃣ Publishing NOT required for package with type identifier of '${o.typeId}'.`);
981
+ d(`Project version '${r.version ?? "unknown"}' released.`);
983
982
  } catch (e) {
984
983
  console.error("❌ Error releasing project", e), process.exit(1);
985
984
  }