@plexus-ms/lib 0.122.1 → 0.124.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/dist/bookkeeping.d.ts +0 -8
- package/dist/bookkeeping.d.ts.map +1 -1
- package/dist/bookkeeping.js +5 -16
- package/dist/bookkeeping.js.map +1 -1
- package/dist/compose.d.ts +41 -0
- package/dist/compose.d.ts.map +1 -0
- package/dist/compose.js +169 -0
- package/dist/compose.js.map +1 -0
- package/dist/consumers.d.ts +3 -18
- package/dist/consumers.d.ts.map +1 -1
- package/dist/consumers.js +13 -42
- package/dist/consumers.js.map +1 -1
- package/dist/context.d.ts +6 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +14 -5
- package/dist/context.js.map +1 -1
- package/dist/deploy.d.ts +11 -3
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +185 -120
- package/dist/deploy.js.map +1 -1
- package/dist/deployTargets.d.ts.map +1 -1
- package/dist/deployTargets.js +8 -7
- package/dist/deployTargets.js.map +1 -1
- package/dist/doctor.d.ts +121 -15
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +512 -71
- package/dist/doctor.js.map +1 -1
- package/dist/effects.d.ts +3 -0
- package/dist/effects.d.ts.map +1 -1
- package/dist/effects.js.map +1 -1
- package/dist/frontmatter.js +1 -1
- package/dist/frontmatter.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/io.d.ts +28 -0
- package/dist/io.d.ts.map +1 -1
- package/dist/io.js +86 -4
- package/dist/io.js.map +1 -1
- package/dist/marker.d.ts +22 -5
- package/dist/marker.d.ts.map +1 -1
- package/dist/marker.js +100 -13
- package/dist/marker.js.map +1 -1
- package/dist/model.d.ts +48 -4
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +59 -11
- package/dist/model.js.map +1 -1
- package/dist/need.d.ts +11 -34
- package/dist/need.d.ts.map +1 -1
- package/dist/need.js +92 -54
- package/dist/need.js.map +1 -1
- package/dist/overview.d.ts +25 -0
- package/dist/overview.d.ts.map +1 -1
- package/dist/overview.js +106 -14
- package/dist/overview.js.map +1 -1
- package/dist/propagate.d.ts +3 -3
- package/dist/propagate.d.ts.map +1 -1
- package/dist/propagate.js +8 -6
- package/dist/propagate.js.map +1 -1
- package/dist/requirements.d.ts +1 -1
- package/dist/requirements.d.ts.map +1 -1
- package/dist/requirements.js +6 -5
- package/dist/requirements.js.map +1 -1
- package/dist/standard-index.json +90 -6
- package/dist/take.d.ts +1 -1
- package/dist/take.d.ts.map +1 -1
- package/dist/take.js +6 -25
- package/dist/take.js.map +1 -1
- package/dist/templates.d.ts +21 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +55 -0
- package/dist/templates.js.map +1 -0
- package/dist/update.d.ts +3 -3
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +58 -71
- package/dist/update.js.map +1 -1
- package/dist/version.d.ts +7 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +17 -2
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/dist/catalog.d.ts +0 -23
- package/dist/catalog.d.ts.map +0 -1
- package/dist/catalog.js +0 -38
- package/dist/catalog.js.map +0 -1
- package/dist/manifest.d.ts +0 -20
- package/dist/manifest.d.ts.map +0 -1
- package/dist/manifest.js +0 -59
- package/dist/manifest.js.map +0 -1
package/dist/doctor.d.ts
CHANGED
|
@@ -1,19 +1,125 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { type Compose, type Mapping } from './compose.ts';
|
|
2
|
+
import type { Context } from './context.ts';
|
|
3
|
+
import { type Declaration } from './marker.ts';
|
|
4
|
+
import { type Kind } from './model.ts';
|
|
5
|
+
export type Profile = 'stateless' | 'stateful';
|
|
6
|
+
/** The marker as read: its declaration, or why it cannot be read. */
|
|
7
|
+
export interface MarkerRead {
|
|
8
|
+
declaration?: Declaration;
|
|
9
|
+
problem?: string;
|
|
10
|
+
}
|
|
11
|
+
/** What doctor read of a repo. */
|
|
12
|
+
export interface RepoFacts {
|
|
13
|
+
kind: 'repo' | 'operations';
|
|
14
|
+
/** Relative to the directory doctor was run on. */
|
|
15
|
+
path: string;
|
|
16
|
+
/** Undefined when the repo carries no marker. */
|
|
17
|
+
marker?: MarkerRead;
|
|
18
|
+
/** The root mise tasks, or why mise could not list them. */
|
|
19
|
+
tasks: {
|
|
20
|
+
names: string[];
|
|
21
|
+
} | {
|
|
22
|
+
problem: string;
|
|
23
|
+
};
|
|
24
|
+
/** The files git tracks, relative to the repo; undefined outside a git checkout. */
|
|
25
|
+
tracked?: string[];
|
|
26
|
+
/** Its apps' directories, relative to the repo (`apps/<name>`). */
|
|
27
|
+
apps: string[];
|
|
28
|
+
}
|
|
29
|
+
/** What doctor read of an app. */
|
|
30
|
+
export interface AppFacts {
|
|
31
|
+
kind: 'app';
|
|
5
32
|
path: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
33
|
+
/** The app's source repo. */
|
|
34
|
+
repo: RepoFacts;
|
|
35
|
+
/** The app's directory, relative to the repo (`apps/<name>`). */
|
|
36
|
+
dir: string;
|
|
37
|
+
thirdParty: boolean;
|
|
38
|
+
marker: MarkerRead;
|
|
39
|
+
/** `docker/compose.yaml`; neither field set when there is none. */
|
|
40
|
+
compose?: Compose;
|
|
41
|
+
composeProblem?: string;
|
|
42
|
+
/** Whether `docker/Dockerfile` exists. */
|
|
43
|
+
dockerfile: boolean;
|
|
44
|
+
/** `package.json`; neither field set when there is none. */
|
|
45
|
+
packageJson?: Mapping;
|
|
46
|
+
packageJsonProblem?: string;
|
|
47
|
+
}
|
|
48
|
+
export type Facts = RepoFacts | AppFacts;
|
|
49
|
+
interface RepoCheck {
|
|
50
|
+
binds: 'repo';
|
|
51
|
+
check: (repo: RepoFacts) => string[];
|
|
52
|
+
}
|
|
53
|
+
/** A check of whichever unit holds what it finds, a repo or an app. */
|
|
54
|
+
interface UnitCheck {
|
|
55
|
+
binds: 'unit';
|
|
56
|
+
check: (unit: Facts) => string[];
|
|
57
|
+
}
|
|
58
|
+
interface AppCheck {
|
|
59
|
+
binds: 'app';
|
|
60
|
+
/** Only an app of this profile. */
|
|
61
|
+
profile?: Profile;
|
|
62
|
+
/** Only a built app, never a third-party one. */
|
|
63
|
+
built?: true;
|
|
64
|
+
check: (app: AppFacts) => string[];
|
|
65
|
+
}
|
|
66
|
+
/** Every requirement doctor checks, by name: what the contract pages list, in their order. */
|
|
67
|
+
export declare const CHECKS: Readonly<Record<string, RepoCheck | AppCheck | UnitCheck>>;
|
|
68
|
+
export interface Finding {
|
|
69
|
+
/** The requirement's name, e.g. `PLX-App/LoopbackPort`. */
|
|
70
|
+
requirement: string;
|
|
71
|
+
problem: string;
|
|
72
|
+
}
|
|
73
|
+
export interface UnitReport {
|
|
74
|
+
path: string;
|
|
75
|
+
kind: Kind;
|
|
76
|
+
/** An app's profile, when its marker states a valid one. */
|
|
77
|
+
profile?: Profile;
|
|
78
|
+
/** The deviations its marker lists, whose checks were not run. */
|
|
79
|
+
deviations: string[];
|
|
80
|
+
findings: Finding[];
|
|
81
|
+
/** What is worth doing and fails no check, such as deleting keys nothing reads any more. */
|
|
82
|
+
hints?: string[];
|
|
9
83
|
}
|
|
10
84
|
export interface Report {
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
export declare
|
|
17
|
-
/**
|
|
18
|
-
export declare function
|
|
85
|
+
units: UnitReport[];
|
|
86
|
+
/** Units with at least one finding. */
|
|
87
|
+
failed: number;
|
|
88
|
+
}
|
|
89
|
+
/** The requirement names the index this plx carries knows: what a deviation may name. */
|
|
90
|
+
export declare const knownRequirements: () => Set<string>;
|
|
91
|
+
/** What was read, against the checks: pure, so a test compares reports. */
|
|
92
|
+
export declare function diagnose(facts: Facts[], known?: Set<string>): Report;
|
|
93
|
+
/** What doctor read under the directory it was given. */
|
|
94
|
+
export interface Examination {
|
|
95
|
+
/** What the unit paths are relative to: the repo's root when the directory is in a repo, else the directory. */
|
|
96
|
+
root: string;
|
|
97
|
+
/** Whether the directory is in a repo; then `root` is that repo's root, and only that repo is read. */
|
|
98
|
+
inRepo: boolean;
|
|
99
|
+
/** Each repo, then its apps. */
|
|
100
|
+
facts: Facts[];
|
|
101
|
+
/** In a workspace, the git roots that are not Plexus repos and were not checked, relative to `root`. */
|
|
102
|
+
skipped: string[];
|
|
103
|
+
/** Symbolic links not followed, so not checked: a directory in a repo's `apps/`, or a repo in a workspace; relative to `root`. */
|
|
104
|
+
links: string[];
|
|
105
|
+
/** Directories that could not be read, so nothing beneath them was checked, with why; relative to `root`. */
|
|
106
|
+
unreadable: {
|
|
107
|
+
path: string;
|
|
108
|
+
why: string;
|
|
109
|
+
}[];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Read the units (§ 1.2 PLX) under `dir`. A repo is a git root; its apps are
|
|
113
|
+
* what `appsOf` finds in its `apps/` (overview.ts; overview reads them by it
|
|
114
|
+
* too), with a marker or without. `dir` is a workspace when git roots lie
|
|
115
|
+
* beneath it, whatever lies above: every git root beneath it is read that is
|
|
116
|
+
* a Plexus repo, which carries a marker or has an app, and the others are
|
|
117
|
+
* named. Otherwise `dir` is in a repo, the nearest git root at or above it,
|
|
118
|
+
* and that repo is read from its root, with no git root nested in it: that
|
|
119
|
+
* is another repo, and none of its files are this repo's. A directory that
|
|
120
|
+
* cannot be read, and a symbolic link to an app or a repo, are named, never
|
|
121
|
+
* fatal.
|
|
122
|
+
*/
|
|
123
|
+
export declare function examine(ctx: Context, dir: string): Promise<Examination>;
|
|
124
|
+
export {};
|
|
19
125
|
//# sourceMappingURL=doctor.d.ts.map
|
package/dist/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../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