@mark1russell7/canon-ontology 0.2.0 → 0.3.0
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/build/index.d.mts +2 -2
- package/build/index.mjs +21 -2
- package/build/index.mjs.map +1 -1
- package/build/{targets-DsUgzuOM.mjs → targets-BwC2nZGy.mjs} +57 -2
- package/build/targets-BwC2nZGy.mjs.map +1 -0
- package/build/{targets-DkEkvgll.d.mts → targets-D3vj1inS.d.mts} +35 -1
- package/build/targets.d.mts +2 -2
- package/build/targets.mjs +1 -1
- package/package.json +1 -1
- package/build/targets-DsUgzuOM.mjs.map +0 -1
package/build/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Home, HomeAnswer } from "@mark1russell7/conventions";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as KindDef, C as EntityRecord, D as GateName, E as GateFact, F as RelationKindDef, I as TestGates, M as LoadedRecord, N as Ontology, O as Grammar, P as Problem, S as EdgeRecord, T as FacetDef, _ as findProblem, a as NecessaryGate, b as problemIdOf, c as SIZES, d as TargetRecord, f as compareTargets, g as ProblemResult, h as ProblemRead, i as NECESSARY_GATES, j as KindMode, k as JsonSchema, l as Size, m as targetsOf, n as Gap, o as ONTOLOGY_REPOSITORY, p as targetId, s as PLACES_SHOWN, t as Acceptance, u as TargetAttrs, v as formalKeyOf, w as Envelope, x as Edge, y as leanKey } from "./targets-D3vj1inS.mjs";
|
|
3
3
|
import { Printer } from "@mark1russell7/text/print";
|
|
4
4
|
import { Transport } from "polite-crawler/api";
|
|
5
5
|
import { RestClient } from "@procedures/gh";
|
|
@@ -652,4 +652,4 @@ export declare function planWrite(root: string, records: readonly EntityRecord[]
|
|
|
652
652
|
export declare function isEmptyPlan(plan: WritePlan): boolean;
|
|
653
653
|
/** This function applies a plan: it writes each file, with its folder, and removes each file of `remove`. */
|
|
654
654
|
export declare function applyPlan(root: string, plan: WritePlan): void;
|
|
655
|
-
export { type Acceptance, type Atlas, type AtlasClass, type AtlasCopy, type AtlasImport, type AtlasRead, type AtlasRepository, type AtlasRow, type BoardAction, type BoardInput, type BoardIssue, type ClaimCommand, type ClaimDecision, type ClaimInput, type ClaimState, type CliOptions, type CloneClass, type CloneGroup, type CloneMember, type Edge, type EdgeRecord, type EntityRecord, type Envelope, type FacetDef, type Gap, type GateFact, type GateName, type GateRepository, type Grammar, type HomeFacts, type HomeImport, type IssueApi, type IssueChange, type IssueText, type JsonSchema, type KindDef, type KindMode, type LoadedRecord, NECESSARY_GATES, type NecessaryGate, type NoRead, type NpmFact, ONTOLOGY_REPOSITORY, type Ontology, PLACES_SHOWN, type PoliteFetchOptions, type Problem, type PublicRepository, type RelationKindDef, type ResultClaim, SIZES, type Scope, type Size, type TargetAttrs, type TargetRecord, type TestGates, type Tree, type UrlAnswers, type UrlFetch, type WritePlan, compareTargets, targetId, targetsOf };
|
|
655
|
+
export { type Acceptance, type Atlas, type AtlasClass, type AtlasCopy, type AtlasImport, type AtlasRead, type AtlasRepository, type AtlasRow, type BoardAction, type BoardInput, type BoardIssue, type ClaimCommand, type ClaimDecision, type ClaimInput, type ClaimState, type CliOptions, type CloneClass, type CloneGroup, type CloneMember, type Edge, type EdgeRecord, type EntityRecord, type Envelope, type FacetDef, type Gap, type GateFact, type GateName, type GateRepository, type Grammar, type HomeFacts, type HomeImport, type IssueApi, type IssueChange, type IssueText, type JsonSchema, type KindDef, type KindMode, type LoadedRecord, NECESSARY_GATES, type NecessaryGate, type NoRead, type NpmFact, ONTOLOGY_REPOSITORY, type Ontology, PLACES_SHOWN, type PoliteFetchOptions, type Problem, type ProblemRead, type ProblemResult, type PublicRepository, type RelationKindDef, type ResultClaim, SIZES, type Scope, type Size, type TargetAttrs, type TargetRecord, type TestGates, type Tree, type UrlAnswers, type UrlFetch, type WritePlan, compareTargets, findProblem, formalKeyOf, leanKey, problemIdOf, targetId, targetsOf };
|
package/build/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { arrayOf, booleanOf, isRecord, numberOf, readArray, readText, recordOf, textOf, timeOf } from "@mark1russell7/optional/read";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as GRAMMAR_FILE, C as scopeText, D as kindOf, E as isLive, F as makeId, I as npmPackageId, L as npmPurl, M as RECORD_SCHEMA_FILE, N as idPart, O as lineageOf, P as kindOfId, R as pathOfId, S as sameScope, T as isKindIn, _ as scopeOf, a as SIZES, b as inScope, c as targetsOf, d as leanKey, f as problemIdOf, g as resultClaimsOf, h as hasFullScope, i as PLACES_SHOWN, j as ONTOLOGY_FOLDER, k as relationOf, l as findProblem, m as claimFails, n as NECESSARY_GATES, o as compareTargets, p as CLAIM_STATUSES, r as ONTOLOGY_REPOSITORY, s as targetId, u as formalKeyOf, v as SCOPE_MODULUS_LIMIT, w as edgesOf, x as readScope, y as canonicalScope, z as repositoryId } from "./targets-BwC2nZGy.mjs";
|
|
3
3
|
import { Ajv2020 } from "ajv/dist/2020.js";
|
|
4
4
|
import formats from "ajv-formats";
|
|
5
5
|
import { countOf, listOf } from "@mark1russell7/text/english";
|
|
@@ -587,6 +587,24 @@ function checkScopes(ontology, problems) {
|
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
+
/**
|
|
591
|
+
* This function examines the formal names (roadmap C12). Two live problems cannot have one Lean key, because a tool
|
|
592
|
+
* finds a problem by its formal name. A short name, for example `conjecture`, names many statements.
|
|
593
|
+
*/
|
|
594
|
+
function checkFormalNames(ontology, problems) {
|
|
595
|
+
const first = /* @__PURE__ */ new Map();
|
|
596
|
+
for (const { path, record } of ontology.records) {
|
|
597
|
+
if (record.kind !== "problem" || !isLive(record)) continue;
|
|
598
|
+
const key = formalKeyOf(record);
|
|
599
|
+
if (key === void 0) continue;
|
|
600
|
+
const earlier = first.get(key);
|
|
601
|
+
if (earlier === void 0) first.set(key, record.id);
|
|
602
|
+
else problems.push({
|
|
603
|
+
path,
|
|
604
|
+
message: `The formal name ${key} is also the formal name of ${earlier}. Give the full name, with its namespaces.`
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
}
|
|
590
608
|
function keyOf(edge, key) {
|
|
591
609
|
return JSON.stringify(key.map((part) => part === "from" ? edge.from : part === "to" ? edge.to : edge.qualifiers[part] ?? null));
|
|
592
610
|
}
|
|
@@ -703,6 +721,7 @@ function checkOntology(ontology) {
|
|
|
703
721
|
} else facts.set(fact, edge.from);
|
|
704
722
|
}
|
|
705
723
|
checkScopes(ontology, problems);
|
|
724
|
+
checkFormalNames(ontology, problems);
|
|
706
725
|
return problems.sort((a, b) => a.path === b.path ? 0 : a.path < b.path ? -1 : 1);
|
|
707
726
|
}
|
|
708
727
|
// src/clones.ts
|
|
@@ -2126,6 +2145,6 @@ function githubIssueApi(client, repository, signal) {
|
|
|
2126
2145
|
}
|
|
2127
2146
|
};
|
|
2128
2147
|
}
|
|
2129
|
-
export { ATLAS_LIMIT, ATLAS_SCHEMA, ATLAS_SOURCE_ID, ATLAS_URL, BENCH_PACKAGE, BOARD_LIMIT, CLAIM_HOURS, CLAIM_STATUSES, CLONE_FLOOR, GATE_NAMES, GITHUB_SOURCE_ID, GRAMMAR_FILE, HOSTS_AT_ONCE, IMPORT_SOURCE_IDS, IssueApiError, MAP_SOURCE_ID, MUTATION_LANE, NECESSARY_GATES, ONTOLOGY_FOLDER, ONTOLOGY_REPOSITORY, OntologyReadError, PLACES_SHOWN, PROPERTY_PACKAGES, RECORD_SCHEMA_FILE, REPOSITORY_PAGES, RIGS_FILE, RULES_PAGE, SCOPE_MODULUS_LIMIT, SIZES, TARGET_LABEL, USAGE, USER_AGENT, actionComment, applyBoard, applyPlan, canonicalScope, checkMatches, checkOntology, claimCommandOf, claimEnd, claimFails, claimTimeOf, cloneGroups, cloneReport, compareTargets, conventionsVersion, decideClaim, edgesOf, fileUrl, filesToRead, findRoot, gateRepositoriesOf, gatesOf, githubIssueApi, githubRepositoryOf, hasFullScope, idPart, inScope, isEmptyPlan, isExpired, isKindIn, isLive, isPackagePath, isWorkflowPath, issueOfItem, issueText, kindOf, kindOfId, lineageOf, makeId, necessaryChecksOf, npmFactOf, npmLatestUrl, npmPackageId, npmPurl, pathOfId, planBoard, planWrite, politeFetch, publicText, readAtlas, readHomeFacts, readOntology, readScope, readTestGates, recordText, recordsFromAtlas, recordsFromHomes, relationOf, repositoriesOfPages, repositoryId, repositoryPageUrls, resultClaimsOf, rulesUrl, runCli, sameScope, scopeOf, scopeText, targetId, targetOfIssue, targetsOf, treeOf, treeUrl, withTestGates };
|
|
2148
|
+
export { ATLAS_LIMIT, ATLAS_SCHEMA, ATLAS_SOURCE_ID, ATLAS_URL, BENCH_PACKAGE, BOARD_LIMIT, CLAIM_HOURS, CLAIM_STATUSES, CLONE_FLOOR, GATE_NAMES, GITHUB_SOURCE_ID, GRAMMAR_FILE, HOSTS_AT_ONCE, IMPORT_SOURCE_IDS, IssueApiError, MAP_SOURCE_ID, MUTATION_LANE, NECESSARY_GATES, ONTOLOGY_FOLDER, ONTOLOGY_REPOSITORY, OntologyReadError, PLACES_SHOWN, PROPERTY_PACKAGES, RECORD_SCHEMA_FILE, REPOSITORY_PAGES, RIGS_FILE, RULES_PAGE, SCOPE_MODULUS_LIMIT, SIZES, TARGET_LABEL, USAGE, USER_AGENT, actionComment, applyBoard, applyPlan, canonicalScope, checkMatches, checkOntology, claimCommandOf, claimEnd, claimFails, claimTimeOf, cloneGroups, cloneReport, compareTargets, conventionsVersion, decideClaim, edgesOf, fileUrl, filesToRead, findProblem, findRoot, formalKeyOf, gateRepositoriesOf, gatesOf, githubIssueApi, githubRepositoryOf, hasFullScope, idPart, inScope, isEmptyPlan, isExpired, isKindIn, isLive, isPackagePath, isWorkflowPath, issueOfItem, issueText, kindOf, kindOfId, leanKey, lineageOf, makeId, necessaryChecksOf, npmFactOf, npmLatestUrl, npmPackageId, npmPurl, pathOfId, planBoard, planWrite, politeFetch, problemIdOf, publicText, readAtlas, readHomeFacts, readOntology, readScope, readTestGates, recordText, recordsFromAtlas, recordsFromHomes, relationOf, repositoriesOfPages, repositoryId, repositoryPageUrls, resultClaimsOf, rulesUrl, runCli, sameScope, scopeOf, scopeText, targetId, targetOfIssue, targetsOf, treeOf, treeUrl, withTestGates };
|
|
2130
2149
|
|
|
2131
2150
|
//# sourceMappingURL=index.mjs.map
|