@intellectual-frontiers/repoctl 0.0.0-stage → 0.1.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/LICENSE +75 -0
- package/README.md +19 -2
- package/dist/governance/checks.d.ts +23 -0
- package/dist/governance/config.d.ts +233 -0
- package/dist/governance/generators.d.ts +54 -0
- package/dist/governance/identity.d.ts +23 -0
- package/dist/governance/ids.d.ts +46 -0
- package/dist/governance/mod.d.ts +25 -0
- package/dist/governance/mod.js +1063 -0
- package/dist/governance/problems.d.ts +28 -0
- package/dist/governance/proof.d.ts +108 -0
- package/dist/governance/tiers.d.ts +25 -0
- package/dist/governance/verbs.d.ts +43 -0
- package/dist/governance/version.d.ts +14 -0
- package/dist/logical/check.d.ts +33 -0
- package/dist/logical/commit.d.ts +64 -0
- package/dist/logical/constants.d.ts +27 -0
- package/dist/logical/declared.d.ts +32 -0
- package/dist/logical/docs.d.ts +31 -0
- package/dist/logical/doctor.d.ts +42 -0
- package/dist/logical/findings.d.ts +26 -0
- package/dist/logical/glob.d.ts +17 -0
- package/dist/logical/hygiene-facts.d.ts +33 -0
- package/dist/logical/hygiene.d.ts +68 -0
- package/dist/logical/merge.d.ts +46 -0
- package/dist/logical/mod.d.ts +36 -0
- package/dist/logical/mod.js +2553 -0
- package/dist/logical/order.d.ts +24 -0
- package/dist/logical/pool.d.ts +14 -0
- package/dist/logical/ports.d.ts +96 -0
- package/dist/logical/prove.d.ts +118 -0
- package/dist/logical/publish.d.ts +70 -0
- package/dist/logical/scaffold.d.ts +52 -0
- package/dist/logical/select.d.ts +83 -0
- package/dist/logical/semver.d.ts +16 -0
- package/dist/logical/status.d.ts +71 -0
- package/dist/logical/step.d.ts +18 -0
- package/dist/logical/surface.d.ts +73 -0
- package/dist/logical/sync.d.ts +34 -0
- package/dist/mod.d.ts +20 -0
- package/dist/mod.js +12992 -0
- package/dist/physical/adapters.d.ts +25 -0
- package/dist/physical/config-load.d.ts +30 -0
- package/dist/physical/define.d.ts +73 -0
- package/dist/physical/mod.d.ts +26 -0
- package/dist/physical/mod.js +12660 -0
- package/dist/physical/program.d.ts +14 -0
- package/dist/physical/prove-run.d.ts +50 -0
- package/dist/physical/prove.d.ts +76 -0
- package/dist/physical/tests.d.ts +54 -0
- package/dist/physical/verbs/check.d.ts +26 -0
- package/dist/physical/verbs/docs.d.ts +6 -0
- package/dist/physical/verbs/library.d.ts +4 -0
- package/dist/physical/verbs/prove.d.ts +5 -0
- package/dist/physical/verbs/releasing.d.ts +27 -0
- package/dist/physical/verbs/sync.d.ts +12 -0
- package/dist/repoctl.d.ts +16 -0
- package/package.json +70 -4
- package/repoctl.mjs +12693 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type Generator, type StepId } from "@intellectual-frontiers/repoctl/governance";
|
|
2
|
+
import { type Finding } from "./findings.js";
|
|
3
|
+
import type { Run, World } from "./ports.js";
|
|
4
|
+
/** What a generator did in a run of `sync`. */
|
|
5
|
+
export type Outcome = {
|
|
6
|
+
readonly kind: "fresh";
|
|
7
|
+
readonly id: StepId;
|
|
8
|
+
} | {
|
|
9
|
+
readonly kind: "regenerated";
|
|
10
|
+
readonly id: StepId;
|
|
11
|
+
} | {
|
|
12
|
+
readonly kind: "stale";
|
|
13
|
+
readonly id: StepId;
|
|
14
|
+
readonly fix: string;
|
|
15
|
+
readonly detail: readonly string[];
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: "failed";
|
|
18
|
+
readonly id: StepId;
|
|
19
|
+
readonly fix: string;
|
|
20
|
+
readonly detail: readonly string[];
|
|
21
|
+
};
|
|
22
|
+
/** Whether `sync` writes, or only checks. */
|
|
23
|
+
export type Mode = "write" | "check";
|
|
24
|
+
/** The run of `sync`: its mode and what each generator did, in the order they ran. */
|
|
25
|
+
export type SyncReport = {
|
|
26
|
+
readonly mode: Mode;
|
|
27
|
+
readonly outcomes: readonly Outcome[];
|
|
28
|
+
};
|
|
29
|
+
/** What a generator's check says of its files, from how it ended. */
|
|
30
|
+
export declare function classify(run: Run): "fresh" | "stale" | "failed";
|
|
31
|
+
/** Runs `sync` over the generators, which are given in the order to run them. `only` limits it to some of them. */
|
|
32
|
+
export declare function runSync(w: Pick<World, "process" | "repo">, mode: Mode, order: readonly Generator[], only?: readonly StepId[]): Promise<SyncReport>;
|
|
33
|
+
/** The findings of a run: a generator that is stale (in the mode `check`) and one that could not be made. */
|
|
34
|
+
export declare function findingsOfSync(report: SyncReport): readonly Finding[];
|
package/dist/mod.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repoctl, the operations program of a repository (commons repoctl 0001-repoctl-layers; 0010-repoctl-host FR-003): the three layers of Kanon as namespaces, the entries of the program (`repoctlProgram` for a host that describes it, `main` for the command line) and what a repository's `repoctl.config.ts` is written with: `defineConfig` and the types of the configuration.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { defineConfig, governance, repoctlProgram } from "@intellectual-frontiers/repoctl";
|
|
7
|
+
* governance.VERBS.sync.tier; // "contributor"
|
|
8
|
+
* typeof repoctlProgram; // "function"
|
|
9
|
+
* defineConfig({ repo: "acme/app", commit: { identity: { name: "A B", email: "a@example.test" } } }).repo; // "acme/app"
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
export * as governance from "./governance/mod.js";
|
|
15
|
+
export * as logical from "./logical/mod.js";
|
|
16
|
+
export * as physical from "./physical/mod.js";
|
|
17
|
+
export { INERT_HOST, loadConfigFile, findConfigFile, repoctlProgram } from "./physical/mod.js";
|
|
18
|
+
export { CONFIG_FILE, DEFAULT_ALLOWED_PATHS, DEFAULT_FORBIDDEN_PATHS, DEFAULT_SECRET_PATTERNS, defineConfig, parseConfig, } from "./governance/mod.js";
|
|
19
|
+
export type { Capabilities, Check, CheckInput, CommitPolicy, Config, ConfigInput, DocsSettings, DoctorPolicy, ForbiddenPath, Generator, GeneratorInput, HygienePolicy, Identity, LibrariesSettings, SecretPattern, Step, StepContext, StepFunction, StepInput, StepRun, TrailerKind, } from "./governance/mod.js";
|
|
20
|
+
export { main, type MainDeps } from "./repoctl.js";
|