@dpuse/dpuse-development 0.3.819 → 1.0.2
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 +11 -12
- package/dist/{apiReference-DmnqS97D.js → apiReference-cMfpNKxR.js} +14 -11
- package/dist/apiReference-cMfpNKxR.js.map +1 -0
- package/dist/dpuse-development.es.js +18 -20
- package/dist/dpuse-development.es.js.map +1 -1
- package/dist/types/src/utilities/index.d.ts +2 -2
- package/dist/{utilities-2Hu30Yg6.js → utilities-BLjGg0iM.js} +1 -1
- package/dist/utilities-BLjGg0iM.js.map +1 -0
- package/package.json +2 -2
- package/vite.config.default.ts +3 -1
- package/vite.config.presenter.ts +3 -1
- package/vite.config.tool.ts +3 -1
- package/vitest.config.ts +3 -1
- package/dist/apiReference-DmnqS97D.js.map +0 -1
- package/dist/utilities-2Hu30Yg6.js.map +0 -1
package/README.md
CHANGED
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
<!-- OPENING_START -->
|
|
4
4
|
|
|
5
5
|
[](./LICENSE)
|
|
6
|
-
[](https://github.com/dpuse/dpuse-development/releases/latest)
|
|
7
6
|
[](https://www.npmjs.com/package/@dpuse/dpuse-development)
|
|
8
7
|
[](https://github.com/dpuse/dpuse-development/actions/workflows/ci.yml)
|
|
9
8
|
|
|
10
|
-
[DPUse](https://www.dpuse.app) · [Report a Vulnerability](https://github.com/dpuse/dpuse-development/security/advisories/new) · [Open an Issue](https://github.com/dpuse/dpuse-development/issues)
|
|
11
|
-
|
|
12
9
|
Actions for managing DPUse projects.
|
|
13
10
|
|
|
11
|
+
[Report a Vulnerability](https://github.com/dpuse/dpuse-development/security/advisories/new) · [Open an Issue](https://github.com/dpuse/dpuse-development/issues)
|
|
12
|
+
|
|
14
13
|
## About DPUse
|
|
15
14
|
|
|
16
|
-
DPUse (Data Positioning & Use) is an in-browser application that positions your data for use through three core activities: sourcing, contextualising, and publishing.
|
|
15
|
+
[DPUse](https://www.dpuse.app) (Data Positioning & Use) is an in-browser application that positions your data for use through three core activities: sourcing, contextualising, and publishing.
|
|
17
16
|
|
|
18
17
|
**Sourcing** uses a library of [Connectors](https://www.dpuse.app/connectors) to establish [Connections](https://www.dpuse.app) to applications, databases, file stores, and curated datasets; these connections are subsequently used to configure structured [Data Views](https://www.dpuse.app) from the underlying sources.
|
|
19
18
|
|
|
@@ -79,33 +78,33 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
|
|
|
79
78
|
|
|
80
79
|
| Chunk/Module/File | Composition |
|
|
81
80
|
| :------------------------------------------------------------------------------- | :------------------------------------------ |
|
|
82
|
-
| **dist/dpuse-development.es.js** | 57.
|
|
83
|
-
| src | `██████████████████░░` 87.
|
|
81
|
+
| **dist/dpuse-development.es.js** | 57.7 kB · gzip 18.4 kB · 62.8% of the build |
|
|
82
|
+
| src | `██████████████████░░` 87.7% · 50.6 kB |
|
|
84
83
|
| ↳ documentDependencies.ts | `▒▒▒▒░░░░░░░░░░░░░░░░` 19.3% · 11.1 kB |
|
|
85
84
|
| ↳ documentQualitySecurity.ts | `▒▒▒░░░░░░░░░░░░░░░░░` 17.2% · 9.9 kB |
|
|
86
85
|
| ↳ documentBundleSizes.ts | `▒▒░░░░░░░░░░░░░░░░░░` 8.7% · 5.0 kB |
|
|
87
|
-
| ↳ checkConfigFiles.ts | `▒░░░░░░░░░░░░░░░░░░░` 6.
|
|
86
|
+
| ↳ checkConfigFiles.ts | `▒░░░░░░░░░░░░░░░░░░░` 6.2% · 3.6 kB |
|
|
88
87
|
| ↳ rustCrates.ts | `▒░░░░░░░░░░░░░░░░░░░` 6.0% · 3.4 kB |
|
|
89
88
|
| ↳ documentUsage.ts | `▒░░░░░░░░░░░░░░░░░░░` 4.7% · 2.7 kB |
|
|
90
89
|
| ↳ documentActions.ts | `▒░░░░░░░░░░░░░░░░░░░` 3.0% · 1.8 kB |
|
|
91
90
|
| ↳ checkDependencies.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.9% · 1.7 kB |
|
|
91
|
+
| ↳ documentOpening.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.8% · 1.6 kB |
|
|
92
92
|
| ↳ cloudflare.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.7% · 1.5 kB |
|
|
93
|
-
| ↳ documentOpening.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.6% · 1.5 kB |
|
|
94
93
|
| ↳ auditDependencies.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.5% · 1.5 kB |
|
|
95
94
|
| ↳ documentContributingLicense.ts | `░░░░░░░░░░░░░░░░░░░░` 2.1% · 1.2 kB |
|
|
96
95
|
| ↳ publishProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% · 972 B |
|
|
97
96
|
| ↳ releaseProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% · 970 B |
|
|
98
97
|
| ↳ testProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.4% · 799 B |
|
|
99
98
|
| ↳ 8 smaller files | `▒░░░░░░░░░░░░░░░░░░░` 4.9% · 2.8 kB |
|
|
100
|
-
| (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 12.
|
|
101
|
-
| **dist/utilities-
|
|
99
|
+
| (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 12.3% · 7.1 kB |
|
|
100
|
+
| **dist/utilities-BLjGg0iM.js** | 23.1 kB · gzip 6.4 kB · 25.2% of the build |
|
|
102
101
|
| @dpuse/dpuse-shared → dist/dpuse-shared.es.js | `██████████░░░░░░░░░░` 50.8% · 11.8 kB |
|
|
103
102
|
| src → index.ts | `███████░░░░░░░░░░░░░` 35.8% · 8.3 kB |
|
|
104
103
|
| valibot → dist/index.mjs | `░░░░░░░░░░░░░░░░░░░░` 1.7% · 413 B |
|
|
105
104
|
| (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 11.6% · 2.7 kB |
|
|
106
|
-
| **dist/apiReference-
|
|
105
|
+
| **dist/apiReference-cMfpNKxR.js** | 8.5 kB · gzip 3.1 kB · 9.2% of the build |
|
|
107
106
|
| src → apiReference.ts | `███████████████████░` 95.1% · 8.0 kB |
|
|
108
|
-
| (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 4.9% ·
|
|
107
|
+
| (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 4.9% · 427 B |
|
|
109
108
|
| **dist/vite.es.js** | 2.5 kB · gzip 1.1 kB · 2.7% of the build |
|
|
110
109
|
| src → vite.ts | `█████████████████░░░` 87.0% · 2.2 kB |
|
|
111
110
|
| (bundler output, whitespace & JSON) | `███░░░░░░░░░░░░░░░░░` 13.0% · 334 B |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, x as t, y as n } from "./utilities-
|
|
1
|
+
import { A as e, x as t, y as n } from "./utilities-BLjGg0iM.js";
|
|
2
2
|
import r from "node:path";
|
|
3
3
|
import i from "typescript";
|
|
4
4
|
//#region src/utilities/apiReference.ts
|
|
@@ -21,14 +21,17 @@ async function l(a, o) {
|
|
|
21
21
|
await e(o, `# API Reference\n\n${c}\n\n${h.join("\n\n")}\n`);
|
|
22
22
|
}
|
|
23
23
|
function u(e) {
|
|
24
|
-
let t = e.name ?? "", n = e.exports;
|
|
25
|
-
|
|
24
|
+
let t = e.name ?? "", n = e.exports, r = typeof n == "object" && n && !Array.isArray(n) ? Object.entries(n) : [], i = [];
|
|
25
|
+
for (let [e, n] of r) {
|
|
26
26
|
let r = typeof n == "object" && n && !Array.isArray(n) ? n.types : void 0;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
if (typeof r != "string") continue;
|
|
28
|
+
let a = e === "." ? t : `${t}${e.slice(1)}`, o = r.replace(/^\.\/dist\/types\//, "").replace(/\.d\.ts$/, ".ts");
|
|
29
|
+
i.push({
|
|
30
|
+
importPath: a,
|
|
31
|
+
sourcePath: o
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return i;
|
|
32
35
|
}
|
|
33
36
|
function d() {
|
|
34
37
|
let e = i.findConfigFile(process.cwd(), (e) => i.sys.fileExists(e));
|
|
@@ -44,11 +47,11 @@ function f(e, t, n) {
|
|
|
44
47
|
let r = e.getSymbolAtLocation(t);
|
|
45
48
|
return (r === void 0 ? [] : e.getExportsOfModule(r)).flatMap((t) => {
|
|
46
49
|
let r = E(e, t), i = m(e, D(t, r), r, n);
|
|
47
|
-
return i === void 0 ? [] :
|
|
50
|
+
return i === void 0 ? [] : {
|
|
48
51
|
...i,
|
|
49
52
|
description: h(e, r),
|
|
50
53
|
topic: p(r)
|
|
51
|
-
}
|
|
54
|
+
};
|
|
52
55
|
}).toSorted((e, t) => e.name.localeCompare(t.name));
|
|
53
56
|
}
|
|
54
57
|
function p(e) {
|
|
@@ -197,7 +200,7 @@ function M(e, t) {
|
|
|
197
200
|
function N(e, t) {
|
|
198
201
|
return s.flatMap((n) => {
|
|
199
202
|
let r = e.filter((e) => e.kind === n).map((e) => P(e));
|
|
200
|
-
return r.length === 0 ? [] :
|
|
203
|
+
return r.length === 0 ? [] : `${t} ${n}\n\n${r.join("\n")}`;
|
|
201
204
|
});
|
|
202
205
|
}
|
|
203
206
|
function P({ description: e, detail: t, name: n, origin: r }) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiReference-cMfpNKxR.js","names":["writeTextFile","readJSONFile","logStepHeader","path","ts","TOPIC_GROUPING_MINIMUM","GENERAL_TOPIC","EXPORT_KINDS","API_REFERENCE_INTRO","writeAPIReference","stepIcon","apiReferencePath","entryPoints","resolveEntryPoints","program","sourcePath","readCompilerOptions","checker","fieldGroupOwners","mapFieldGroupOwners","sections","sourceFile","importPath","buildSection","listExports","packageName","packageJSON","exportsField","exportEntries","subpath","target","typesPath","\"types\"","configPath","fileName","config","moduleSymbol","symbol","resolveAlias","exportedSymbol","entry","describeExport","formatExportName","readDescription","readTopic","a","b","resolvePath","unresolvedPath","folder","segment","letter","signature","isSchema","name","formatParameter","parameter","formatOrigin","formatConstantType","description","declaration","variableDeclaration","initializer","isWrittenAs","typeNode","formatTypeNode","clauses","clause","formatCode","type","typeAlias","schemaName","findSchemaName","fields","findSchemaFields","parents","findSchemaParents","parent","group","property","resolveObjectLiteral","owner","typeName","candidates","typeAliases","statement","listFieldGroups","owners","groupCandidates","fewestAdded","addedFieldCount","tied","ownGroup","spreadGroups","argument","isTypeReferenceNamed","returnTypeArgument","fieldsQuery","schema","resolveInitializer","node","declarationName","parameterDeclaration","isOptional","typeText","formatParameterName","names","element","topics","entries","compareTopics","buildKindLists","topicSections","topic","items","kind","formatEntry","headingLevel","detailCode","detail","firstLine","origin","text"],"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 const entryPoints: { importPath: string; sourcePath: string }[] = [];\n for (const [subpath, target] of exportEntries) {\n const typesPath = target != null && typeof target === 'object' && !Array.isArray(target) ? target['types'] : undefined;\n if (typeof typesPath !== 'string') continue;\n const importPath = subpath === '.' ? packageName : `${packageName}${subpath.slice(1)}`;\n const sourcePath = typesPath.replace(/^\\.\\/dist\\/types\\//, '').replace(/\\.d\\.ts$/, '.ts');\n entryPoints.push({ importPath, sourcePath });\n }\n return entryPoints;\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,IAAMK,IAAyB,GAGzBC,IAAgB,WAGhBC,IAA6B;CAAC;CAAa;CAAW;CAAa;CAAW;AAAO,GAErFC,IAAsB;AAO5B,eAAsBC,EAAkB,GAAkB,GAAyC;CAC/F,EAAc,GAAGC,EAAS,UAAUC,EAAiB,EAAE;CAGvD,IAAMC,IAAcC,EAAmB,MADbZ,EAA0B,cAAc,CAChB;CAClD,IAAIW,EAAY,WAAW,GAAG,MAAU,MAAM,qGAAqG;CAInJ,IAAME,IAAUV,EAAG,cACfQ,EAAY,KAAK,EAAE,oBAAiBT,EAAK,QAAQY,CAAU,CAAC,GAC5DC,EAAoB,CACxB,GACMC,IAAUH,EAAQ,eAAe,GACjCI,IAAmBC,EAAoBL,GAASG,CAAO,GAEvDG,IAAWR,EAAY,KAAK,EAAE,eAAY,oBAAiB;EAC7D,IAAMS,IAAaP,EAAQ,cAAcX,EAAK,QAAQY,CAAU,CAAC;EACjE,IAAIM,MAAe,KAAA,GAAW,MAAU,MAAM,mBAAmBN,EAAW,oBAAoBO,EAAW,GAAG;EAC9G,OAAOC,EAAaD,GAAYE,EAAYP,GAASI,GAAYH,CAAgB,CAAC;CACtF,CAAC;CAED,MAAMlB,EAAcW,GAAkB,sBAAsBH,EAAoB,MAAMY,EAAS,KAAK,MAAM,EAAE,GAAG;AACnH;AAMA,SAASP,EAAmB,GAAwE;CAChG,IA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AASF,EAAc,GAAW,GAAmB;CAEjD,OADwBjE,MAAMvC,KAAiBwC,MAAMxC,IAC5B,OAAOwC,MAAMxC,CAAa,IAAI,OAAOuC,MAAMvC,CAAa,IAAIuC,EAAE,cAAcC,CAAC;AAC1G;AAEA,SAASiE,EAAe,GAAwB,GAAgC;CAC5E,OAAOxG,EAAa,SAAS,MAAS;EAClC,IAAM2G,IAAQL,EAAQ,QAAQ,MAAUrE,EAAM,SAAS2E,CAAI,CAAC,CAAC,KAAK,MAAUC,EAAY5E,CAAK,CAAC;EAC9F,OAAO0E,EAAM,WAAW,IAAI,CAAC,IAAI,GAAGG,EAAa,GAAGF,EAAK,MAAMD,EAAM,KAAK,IAAI;CAClF,CAAC;AACL;AAKA,SAASE,EAAY,EAAE,gBAAa,WAAQ,SAAM,aAA+B;CAC7E,IAAME,IAAaC,MAAW,KAAK,KAAKnD,EAAWmD,CAAM,GACnDC,IAAY,OAAOpD,EAAWd,CAAI,EAAE,IAAIgE,IAAaG;CAC3D,OAAO9D,MAAgB,KAAA,IAAY6D,IAAY,GAAGA,EAAU,UAAU7D;AAC1E;AAEA,SAASS,EAAW,GAAsB;CACtC,OAAO,KAAKsD,EAAK;AACrB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, D as t, E as n, M as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, j as g, k as _, l as v, m as y, n as ee, o as te, p as b, r as x, s as ne, t as re, u as S, v as C, w, x as T, y as E } from "./utilities-
|
|
1
|
+
import { C as e, D as t, E as n, M as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, j as g, k as _, l as v, m as y, n as ee, o as te, p as b, r as x, s as ne, t as re, u as S, v as C, w, x as T, y as E } from "./utilities-BLjGg0iM.js";
|
|
2
2
|
import { SHIPPED_PACKAGES_FILE_NAME as ie } from "./vite.es.js";
|
|
3
3
|
import { existsSync as ae, promises as D } from "node:fs";
|
|
4
4
|
import O from "node:path";
|
|
@@ -236,7 +236,7 @@ async function Re() {
|
|
|
236
236
|
async function ze() {
|
|
237
237
|
try {
|
|
238
238
|
s("Document Contributing & License");
|
|
239
|
-
let [e, t] = await Promise.all([T("package.json"), T("config.json")]), { owner: n,
|
|
239
|
+
let [e, t] = await Promise.all([T("package.json"), T("config.json")]), { owner: n, repository: r } = w(e, "document contributing and license"), i = Be(e), a = Ve(t.firstCreatedAt);
|
|
240
240
|
E("1️⃣ Insert contributing and license content into 'README.md'"), await l(), await _(He(n, r, i, a), ee, re), C("Contributing & license documented");
|
|
241
241
|
} catch (e) {
|
|
242
242
|
console.error("❌ Error documenting contributing and license", e), process.exit(1);
|
|
@@ -667,8 +667,8 @@ var Ot = "<!-- OPENING_START -->", kt = "<!-- OPENING_END -->";
|
|
|
667
667
|
async function At() {
|
|
668
668
|
try {
|
|
669
669
|
s("Document Opening"), E("1️⃣ Insert opening content into 'README.md'");
|
|
670
|
-
let e = await T("package.json"), t = await T("config.json"), { owner: n,
|
|
671
|
-
await _(
|
|
670
|
+
let e = await T("package.json"), t = await T("config.json"), { owner: n, repository: r } = w(e, "document opening"), i = jt(e), a = Nt(t), o = m(t.id), c = Pt(n, r, i, o.uploadGroupName !== void 0, o.publishedTo === "npm" ? Mt(e) : void 0, e.description, a);
|
|
671
|
+
await _(c, Ot, kt), C("Opening documented");
|
|
672
672
|
} catch (e) {
|
|
673
673
|
console.error("❌ Error documenting opening", e), process.exit(1);
|
|
674
674
|
}
|
|
@@ -687,17 +687,16 @@ function Nt(e) {
|
|
|
687
687
|
let t = e.description.en?.trim();
|
|
688
688
|
return t === void 0 || t === "" ? void 0 : t;
|
|
689
689
|
}
|
|
690
|
-
function Pt(e, t, n, r, i, a) {
|
|
691
|
-
let
|
|
692
|
-
return `[}-blue.svg)](./LICENSE)
|
|
693
|
-
[](${o}/actions/workflows/ci.yml)
|
|
690
|
+
function Pt(e, t, n, r, i, a, o) {
|
|
691
|
+
let s = `https://github.com/${e}/${t}`;
|
|
692
|
+
return `[}-blue.svg)](./LICENSE)${r ? `\n[](${s}/releases/latest)` : ""}${i === void 0 ? "" : `\n[](https://www.npmjs.com/package/${i})`}
|
|
693
|
+
[](${s}/actions/workflows/ci.yml)${a == null || a === "" ? "" : `\n\n${a}`}
|
|
695
694
|
|
|
696
|
-
[
|
|
695
|
+
[Report a Vulnerability](${s}/security/advisories/new) · [Open an Issue](${s}/issues)
|
|
697
696
|
|
|
698
697
|
## About DPUse
|
|
699
698
|
|
|
700
|
-
DPUse (Data Positioning & Use) is an in-browser application that positions your data for use through three core activities: sourcing, contextualising, and publishing.
|
|
699
|
+
[DPUse](https://www.dpuse.app) (Data Positioning & Use) is an in-browser application that positions your data for use through three core activities: sourcing, contextualising, and publishing.
|
|
701
700
|
|
|
702
701
|
**Sourcing** uses a library of [Connectors](https://www.dpuse.app/connectors) to establish [Connections](https://www.dpuse.app) to applications, databases, file stores, and curated datasets; these connections are subsequently used to configure structured [Data Views](https://www.dpuse.app) from the underlying sources.
|
|
703
702
|
|
|
@@ -705,7 +704,7 @@ DPUse (Data Positioning & Use) is an in-browser application that positions your
|
|
|
705
704
|
|
|
706
705
|
**Publishing** uses a library of [Presenters](https://www.dpuse.app) to render standard [Presentations](https://www.dpuse.app) immediately using the contextualised data; additionally, [Cookbooks](https://www.dpuse.app) of [Recipes](https://www.dpuse.app) let you build Data Apps using your preferred tools.
|
|
707
706
|
|
|
708
|
-
In addition, DPUse provides [Tools](https://www.dpuse.app) used by the application, and you can use them to construct connectors and presenters.${
|
|
707
|
+
In addition, DPUse provides [Tools](https://www.dpuse.app) used by the application, and you can use them to construct connectors and presenters.${o === void 0 ? "" : `\n\n## Introduction\n\n${o}`}`;
|
|
709
708
|
}
|
|
710
709
|
//#endregion
|
|
711
710
|
//#region src/actions/documentQualitySecurity.ts
|
|
@@ -727,7 +726,7 @@ var Ft = {
|
|
|
727
726
|
async function Kt() {
|
|
728
727
|
try {
|
|
729
728
|
s("Document Quality & Security");
|
|
730
|
-
let e = await T("package.json"), t = await qt(e), n = await Yt(e, t === void 0 ? [] : ["--coverage", Lt]), { owner: r,
|
|
729
|
+
let e = await T("package.json"), t = await qt(e), n = await Yt(e, t === void 0 ? [] : ["--coverage", Lt]), { owner: r, repository: i } = w(e, "document quality and security");
|
|
731
730
|
E("4️⃣ Read security checks and settings");
|
|
732
731
|
let a = await Zt(r, i, e);
|
|
733
732
|
E("5️⃣ Look up OpenSSF Best Practices badge and Scorecard results");
|
|
@@ -796,20 +795,19 @@ async function Xt(e) {
|
|
|
796
795
|
});
|
|
797
796
|
}
|
|
798
797
|
async function Zt(t, n, r) {
|
|
799
|
-
let [i, a, o
|
|
798
|
+
let [i, a, o] = await Promise.all([
|
|
800
799
|
e(".github/workflows/ci.yml"),
|
|
801
|
-
e(".github/workflows/codeql.yml"),
|
|
802
800
|
e(".github/dependabot.yml"),
|
|
803
801
|
e(v)
|
|
804
|
-
]), [c, l, u, d] = await Promise.all([
|
|
802
|
+
]), s = await e(".github/workflows/codeql.yml") ?? "", [c, l, u, d] = await Promise.all([
|
|
805
803
|
U(`repos/${t}/${n}`),
|
|
806
804
|
U(`repos/${t}/${n}/private-vulnerability-reporting`),
|
|
807
805
|
U(`repos/${t}/${n}/vulnerability-alerts`),
|
|
808
806
|
U(`repos/${t}/${n}/commits/main/check-runs?per_page=100`)
|
|
809
|
-
]), f = c === void 0 ? void 0 : JSON.parse(c).security_and_analysis, p = (e) => f?.[e] === void 0 ? void 0 : f[e].status === "enabled", m = new Set((d === void 0 ? [] : JSON.parse(d).check_runs).map((e) => e.app?.slug)), h =
|
|
807
|
+
]), f = c === void 0 ? void 0 : JSON.parse(c).security_and_analysis, p = (e) => f?.[e] === void 0 ? void 0 : f[e].status === "enabled", m = new Set((d === void 0 ? [] : JSON.parse(d).check_runs).map((e) => e.app?.slug)), h = a?.match(/package-ecosystem:/g)?.length ?? 0, g = a?.match(/open-pull-requests-limit: 0\b/g)?.length ?? 0;
|
|
810
808
|
return {
|
|
811
|
-
codeQLLanguages:
|
|
812
|
-
codeQLQueries: /queries: ([\w-]+)/.exec(
|
|
809
|
+
codeQLLanguages: s.matchAll(/- language: ([\w-]+)/g).filter(([, e]) => e !== "rust" || o !== null).map(([, e = ""]) => Ht[e] ?? e).toArray(),
|
|
810
|
+
codeQLQueries: /queries: ([\w-]+)/.exec(s)?.[1],
|
|
813
811
|
dependabotAlerts: u !== void 0,
|
|
814
812
|
dependabotSecurityUpdates: p("dependabot_security_updates"),
|
|
815
813
|
dependabotVersionUpdates: h > g,
|
|
@@ -1025,7 +1023,7 @@ var q = "API_REFERENCE.md";
|
|
|
1025
1023
|
async function vn() {
|
|
1026
1024
|
try {
|
|
1027
1025
|
s("Document API Reference");
|
|
1028
|
-
let { writeAPIReference: e } = await import("./apiReference-
|
|
1026
|
+
let { writeAPIReference: e } = await import("./apiReference-cMfpNKxR.js");
|
|
1029
1027
|
await e("1️⃣ ", q), C("API reference documented");
|
|
1030
1028
|
} catch (e) {
|
|
1031
1029
|
console.error("❌ Error documenting API reference", e), process.exit(1);
|