@antelopejs/tooling-configs 0.2.11 → 0.2.12
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 +8 -0
- package/dist/bin/garden.mjs +13 -71
- package/dist/bin/suppressions.mjs +32 -20
- package/dist/bin/sync.mjs +366 -22
- package/dist/bin/verify.d.mts +1 -0
- package/dist/bin/verify.mjs +3000 -0
- package/dist/checks-BlWDFYio.mjs +94 -0
- package/dist/json-BqvuCkqr.mjs +67 -0
- package/dist/kinds-Bzyyi9yk.mjs +25 -0
- package/dist/verify/index.d.mts +262 -0
- package/dist/verify/index.mjs +2 -0
- package/package.json +5 -3
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { i as isObject } from "./json-BqvuCkqr.mjs";
|
|
2
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
+
//#region src/verify/checks.ts
|
|
4
|
+
function excerpt(text) {
|
|
5
|
+
const flat = text.replace(/\s+/g, " ").trim();
|
|
6
|
+
return flat.length > 300 ? `${flat.slice(0, 300)}…` : flat;
|
|
7
|
+
}
|
|
8
|
+
/** The process exited with `code`. */
|
|
9
|
+
function exitIs(result, code) {
|
|
10
|
+
return {
|
|
11
|
+
name: `exit code ${code}`,
|
|
12
|
+
pass: result.exitCode === code,
|
|
13
|
+
detail: `exit code ${result.exitCode}`
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/** The process ended on SIGINT, by exit code 130 or by the signal itself. */
|
|
17
|
+
function interrupted(result) {
|
|
18
|
+
return {
|
|
19
|
+
name: "ended by SIGINT (exit 130)",
|
|
20
|
+
pass: result.exitCode === 130 || result.signal === "SIGINT",
|
|
21
|
+
detail: `exit code ${result.exitCode}, signal ${result.signal}`
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** `text` matches `pattern`; `label` names the stream. */
|
|
25
|
+
function has(label, text, pattern) {
|
|
26
|
+
return {
|
|
27
|
+
name: `${label} matches ${pattern}`,
|
|
28
|
+
pass: pattern.test(text),
|
|
29
|
+
detail: excerpt(text)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** `text` does not match `pattern`. */
|
|
33
|
+
function lacks(label, text, pattern) {
|
|
34
|
+
return {
|
|
35
|
+
name: `${label} does not match ${pattern}`,
|
|
36
|
+
pass: !pattern.test(text),
|
|
37
|
+
detail: excerpt(text)
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** A file or folder exists at `file`. */
|
|
41
|
+
function exists(file) {
|
|
42
|
+
const present = existsSync(file);
|
|
43
|
+
return {
|
|
44
|
+
name: `${file} exists`,
|
|
45
|
+
pass: present,
|
|
46
|
+
detail: present ? "present" : "missing"
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** The file at `file` matches `pattern`. */
|
|
50
|
+
function fileHas(file, pattern) {
|
|
51
|
+
const text = existsSync(file) ? readFileSync(file, "utf8") : "";
|
|
52
|
+
return {
|
|
53
|
+
name: `${file} matches ${pattern}`,
|
|
54
|
+
pass: pattern.test(text),
|
|
55
|
+
detail: excerpt(text)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/** Two values are deeply equal once serialized. */
|
|
59
|
+
function equal(name, actual, expected) {
|
|
60
|
+
const left = JSON.stringify(actual);
|
|
61
|
+
const right = JSON.stringify(expected);
|
|
62
|
+
return {
|
|
63
|
+
name,
|
|
64
|
+
pass: left === right,
|
|
65
|
+
detail: `expected ${right}, got ${left}`
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** The request answered `status` (200 by default). */
|
|
69
|
+
function answered(result, status = 200) {
|
|
70
|
+
return {
|
|
71
|
+
name: `${result.url} answers ${status}`,
|
|
72
|
+
pass: result.status === status,
|
|
73
|
+
detail: result.error ?? `status ${result.status}, body ${excerpt(result.body)}`
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/** The request answered 200 with JSON whose `key` is `expected`. */
|
|
77
|
+
function answers(result, key, expected) {
|
|
78
|
+
const actual = result.json !== void 0 && isObject(result.json) ? result.json[key] : void 0;
|
|
79
|
+
return {
|
|
80
|
+
name: `${result.url} answers 200 with ${key} ${JSON.stringify(expected)}`,
|
|
81
|
+
pass: result.status === 200 && JSON.stringify(actual) === JSON.stringify(expected),
|
|
82
|
+
detail: result.error ?? `status ${result.status}, body ${excerpt(result.body)}`
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/** Nothing answered the request. */
|
|
86
|
+
function refused(result) {
|
|
87
|
+
return {
|
|
88
|
+
name: `${result.url} is refused`,
|
|
89
|
+
pass: result.status === null,
|
|
90
|
+
detail: result.error ?? `status ${result.status}`
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { exitIs as a, interrupted as c, exists as i, lacks as l, answers as n, fileHas as o, equal as r, has as s, answered as t, refused as u };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//#region src/garden/json.ts
|
|
2
|
+
/** Raised when an API payload lacks a field the Gardener relies on. */
|
|
3
|
+
var DecodeError = class extends Error {};
|
|
4
|
+
function isString(value) {
|
|
5
|
+
return String(value) === value;
|
|
6
|
+
}
|
|
7
|
+
function isNumber(value) {
|
|
8
|
+
return Number.isFinite(value);
|
|
9
|
+
}
|
|
10
|
+
function isObject(value) {
|
|
11
|
+
return Object(value) === value && !Array.isArray(value);
|
|
12
|
+
}
|
|
13
|
+
function parseJson(text) {
|
|
14
|
+
return JSON.parse(text);
|
|
15
|
+
}
|
|
16
|
+
function object(value, path) {
|
|
17
|
+
if (!isObject(value)) throw new DecodeError(`${path}: expected an object`);
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
function list(value, path) {
|
|
21
|
+
if (!Array.isArray(value)) throw new DecodeError(`${path}: expected a list`);
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
function str(source, key) {
|
|
25
|
+
const value = source[key];
|
|
26
|
+
if (value === void 0 || !isString(value)) throw new DecodeError(`${key}: expected a string`);
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
function optStr(source, key) {
|
|
30
|
+
const value = source[key];
|
|
31
|
+
return value !== void 0 && isString(value) ? value : void 0;
|
|
32
|
+
}
|
|
33
|
+
function num(source, key) {
|
|
34
|
+
const value = source[key];
|
|
35
|
+
if (value === void 0 || !isNumber(value)) throw new DecodeError(`${key}: expected a number`);
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
function optNum(source, key) {
|
|
39
|
+
const value = source[key];
|
|
40
|
+
return value !== void 0 && isNumber(value) ? value : void 0;
|
|
41
|
+
}
|
|
42
|
+
function flag(source, key) {
|
|
43
|
+
return source[key] === true;
|
|
44
|
+
}
|
|
45
|
+
function child(source, key) {
|
|
46
|
+
const value = source[key];
|
|
47
|
+
return value === void 0 ? {} : object(value, key);
|
|
48
|
+
}
|
|
49
|
+
function children(source, key) {
|
|
50
|
+
const value = source[key];
|
|
51
|
+
return value === void 0 ? [] : list(value, key).map((entry) => object(entry, key));
|
|
52
|
+
}
|
|
53
|
+
function strings(source, key) {
|
|
54
|
+
const value = source[key];
|
|
55
|
+
return value === void 0 ? [] : list(value, key).filter((entry) => isString(entry));
|
|
56
|
+
}
|
|
57
|
+
function time(source, key) {
|
|
58
|
+
const value = Date.parse(str(source, key));
|
|
59
|
+
if (Number.isNaN(value)) throw new DecodeError(`${key}: expected a date`);
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
function optTime(source, key) {
|
|
63
|
+
const value = optStr(source, key);
|
|
64
|
+
return value === void 0 ? void 0 : Date.parse(value);
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { isString as a, object as c, optTime as d, parseJson as f, time as h, isObject as i, optNum as l, strings as m, children as n, list as o, str as p, flag as r, num as s, child as t, optStr as u };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/verify/kinds.ts
|
|
2
|
+
/** The repository kinds whose verification skill is synced from this pack. */
|
|
3
|
+
const VERIFY_KINDS = [
|
|
4
|
+
"interface",
|
|
5
|
+
"module",
|
|
6
|
+
"template"
|
|
7
|
+
];
|
|
8
|
+
/** Whether `value` names a shared verification kind. */
|
|
9
|
+
function isVerifyKind(value) {
|
|
10
|
+
return VERIFY_KINDS.some((kind) => kind === value);
|
|
11
|
+
}
|
|
12
|
+
/** The skill folder of a kind, relative to the repository root. */
|
|
13
|
+
function skillFolder(kind) {
|
|
14
|
+
return `.agents/skills/verify-${kind}`;
|
|
15
|
+
}
|
|
16
|
+
/** The `.claude/skills` link that exposes a kind's skill folder to Claude Code. */
|
|
17
|
+
function claudeLink(kind) {
|
|
18
|
+
return `.claude/skills/verify-${kind}`;
|
|
19
|
+
}
|
|
20
|
+
/** Where the link points, relative to the link's own folder. */
|
|
21
|
+
function claudeLinkTarget(kind) {
|
|
22
|
+
return `../../${skillFolder(kind)}`;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { skillFolder as a, isVerifyKind as i, claudeLink as n, claudeLinkTarget as r, VERIFY_KINDS as t };
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
//#region src/garden/json.d.ts
|
|
2
|
+
type JsonValue = string | number | boolean | null | JsonValue[] | JsonObject;
|
|
3
|
+
interface JsonObject {
|
|
4
|
+
[key: string]: JsonValue;
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/verify/types.d.ts
|
|
8
|
+
/** A kind of one-way door, the closed list of Upd4ting/outer-loop#42. */
|
|
9
|
+
type DoorKind = "data" | "format" | "contract" | "outbound" | "exposure" | "publish";
|
|
10
|
+
/** Path rules for one door kind: the globs, the declared funnel modules and the journeys that contain it. */
|
|
11
|
+
interface DoorRule {
|
|
12
|
+
/** Repository paths whose change opens a door of this kind, on top of the pack's defaults for the repo kind. */
|
|
13
|
+
globs: string[];
|
|
14
|
+
/** The only modules allowed to make this kind's calls (outbound clients, raw deletes); also path rules. */
|
|
15
|
+
funnels: string[];
|
|
16
|
+
/** Journeys, as `feature/journey`, whose pass contains a Data or Format door of this kind. */
|
|
17
|
+
containments: string[];
|
|
18
|
+
/** Why these paths are doors in this repository. */
|
|
19
|
+
why: string;
|
|
20
|
+
}
|
|
21
|
+
/** Every door kind with its rule, or `null` when the kind cannot apply to the repository. */
|
|
22
|
+
type DoorRules = { [Kind in DoorKind]: DoorRule | null; };
|
|
23
|
+
/** A formal check, the source files it covers, the command that runs it and how its output names a violated rule. */
|
|
24
|
+
interface FormalCheck {
|
|
25
|
+
name: string;
|
|
26
|
+
covers: string[];
|
|
27
|
+
command: string[];
|
|
28
|
+
violation: RegExp | null;
|
|
29
|
+
}
|
|
30
|
+
/** A backing service the harness runs in Docker for every run, published on a free loopback port. */
|
|
31
|
+
interface ServiceDefinition {
|
|
32
|
+
image: string;
|
|
33
|
+
/** The port the service listens on inside its container. */
|
|
34
|
+
port: number;
|
|
35
|
+
env?: {
|
|
36
|
+
[name: string]: string;
|
|
37
|
+
};
|
|
38
|
+
/** Runs inside the container until it exits 0: the readiness probe. */
|
|
39
|
+
ready: string[];
|
|
40
|
+
/** Runs inside the container before each journey, so every journey starts from a clean state. */
|
|
41
|
+
reset?: string[];
|
|
42
|
+
}
|
|
43
|
+
/** Where a running service answers from the host. */
|
|
44
|
+
interface ServiceEndpoint {
|
|
45
|
+
name: string;
|
|
46
|
+
container: string;
|
|
47
|
+
host: string;
|
|
48
|
+
port: number;
|
|
49
|
+
}
|
|
50
|
+
/** One expectation a step met or missed, with what was observed. */
|
|
51
|
+
interface Check {
|
|
52
|
+
name: string;
|
|
53
|
+
pass: boolean;
|
|
54
|
+
detail: string;
|
|
55
|
+
}
|
|
56
|
+
/** What one driven command produced, read back from its evidence folder. */
|
|
57
|
+
interface CommandResult {
|
|
58
|
+
folder: string;
|
|
59
|
+
command: string;
|
|
60
|
+
exitCode: number | null;
|
|
61
|
+
signal: string | null;
|
|
62
|
+
stdout: string;
|
|
63
|
+
stderr: string;
|
|
64
|
+
}
|
|
65
|
+
/** The answer of an HTTP request, or the network error when nothing answered. */
|
|
66
|
+
interface HttpResult {
|
|
67
|
+
folder: string;
|
|
68
|
+
url: string;
|
|
69
|
+
status: number | null;
|
|
70
|
+
body: string;
|
|
71
|
+
json: JsonValue | undefined;
|
|
72
|
+
error: string | null;
|
|
73
|
+
}
|
|
74
|
+
/** The tree a step recorded: its folder and every path with its size. */
|
|
75
|
+
interface TreeRecord {
|
|
76
|
+
folder: string;
|
|
77
|
+
lines: string[];
|
|
78
|
+
}
|
|
79
|
+
/** Options of `ajs project dev`: extra environment and extra flags such as `--watch`. */
|
|
80
|
+
interface DevOptions {
|
|
81
|
+
env?: {
|
|
82
|
+
[name: string]: string;
|
|
83
|
+
};
|
|
84
|
+
args?: string[];
|
|
85
|
+
}
|
|
86
|
+
/** Options of a driven command. */
|
|
87
|
+
interface DriveOptions {
|
|
88
|
+
cwd?: string;
|
|
89
|
+
env?: {
|
|
90
|
+
[name: string]: string;
|
|
91
|
+
};
|
|
92
|
+
timeoutMs?: number;
|
|
93
|
+
}
|
|
94
|
+
/** A request to the driver module: call an interface member through core, then chain methods on the awaited result. */
|
|
95
|
+
interface CallRequest {
|
|
96
|
+
/** The interface package; defaults to the interface under verification, or the module's only implemented interface. */
|
|
97
|
+
interface?: string;
|
|
98
|
+
/** The export subpath, `.` by default. */
|
|
99
|
+
entry?: string;
|
|
100
|
+
/** The member path inside the entry, for example `["GetClient"]`. */
|
|
101
|
+
path: string[];
|
|
102
|
+
args?: JsonValue[];
|
|
103
|
+
/** Methods called in turn on the awaited result, each `[method, ...args]`. */
|
|
104
|
+
chain?: JsonValue[][];
|
|
105
|
+
}
|
|
106
|
+
/** What the driver answered: the awaited value, or the error the call threw. */
|
|
107
|
+
interface CallResult extends HttpResult {
|
|
108
|
+
ok: boolean;
|
|
109
|
+
value: JsonValue | undefined;
|
|
110
|
+
}
|
|
111
|
+
/** A running `ajs project dev` and the ports it answers on. */
|
|
112
|
+
interface App {
|
|
113
|
+
name: string;
|
|
114
|
+
pid: number;
|
|
115
|
+
folder: string;
|
|
116
|
+
project: string;
|
|
117
|
+
/** The driver module's port in a fixture project, or the port given to a scaffolded project. */
|
|
118
|
+
port: number;
|
|
119
|
+
}
|
|
120
|
+
/** How a stopped app ended, with its output. */
|
|
121
|
+
interface StopResult {
|
|
122
|
+
folder: string;
|
|
123
|
+
exitCode: number | null;
|
|
124
|
+
signal: string | null;
|
|
125
|
+
stdout: string;
|
|
126
|
+
stderr: string;
|
|
127
|
+
}
|
|
128
|
+
/** The API a journey drives the product through. Every call records its evidence in a numbered step folder. */
|
|
129
|
+
interface JourneyContext {
|
|
130
|
+
/** The repository under verification. */
|
|
131
|
+
readonly repo: string;
|
|
132
|
+
/** The journey's scratch folder, removed by `clean`. */
|
|
133
|
+
readonly work: string;
|
|
134
|
+
/** The journey's own HOME. */
|
|
135
|
+
readonly home: string;
|
|
136
|
+
command(name: string, program: string, args: string[], options?: DriveOptions): Promise<CommandResult>;
|
|
137
|
+
edit(name: string, file: string, content: string): string;
|
|
138
|
+
tree(name: string, root: string): TreeRecord;
|
|
139
|
+
http(name: string, url: string, init?: {
|
|
140
|
+
method?: string;
|
|
141
|
+
body?: string;
|
|
142
|
+
}): Promise<HttpResult>;
|
|
143
|
+
/** Records the checks of a step. A failing `critical` step ends the journey. */
|
|
144
|
+
expect(folder: string, checks: Check[], options?: {
|
|
145
|
+
critical?: boolean;
|
|
146
|
+
}): boolean;
|
|
147
|
+
/** Ends the journey as not verified, for example when provider sandbox keys are missing. */
|
|
148
|
+
notVerified(reason: string): never;
|
|
149
|
+
service(name: string): ServiceEndpoint;
|
|
150
|
+
/** Runs a command inside a service's container: the read-back through the native client. */
|
|
151
|
+
native(name: string, service: string, args: string[]): Promise<CommandResult>;
|
|
152
|
+
/** Writes the fixture project of the interface or module kind and returns its folder. */
|
|
153
|
+
fixture(options?: {
|
|
154
|
+
moduleConfig?: JsonObject;
|
|
155
|
+
}): string;
|
|
156
|
+
/** Starts `ajs project dev` in a project and waits until it is ready. */
|
|
157
|
+
dev(name: string, project: string, options?: DevOptions): Promise<App>;
|
|
158
|
+
call(name: string, app: App, request: CallRequest): Promise<CallResult>;
|
|
159
|
+
/** Stops an app with SIGINT by recorded PID. */
|
|
160
|
+
stop(name: string, app: App): Promise<StopResult>;
|
|
161
|
+
/** Creates a project from the template under verification with `ajs project init`. */
|
|
162
|
+
scaffold(name: string, project: string, flags?: string[]): Promise<CommandResult>;
|
|
163
|
+
}
|
|
164
|
+
/** A repo-owned journey of `verify.config.ts`, named by id in a feature file. */
|
|
165
|
+
interface Journey {
|
|
166
|
+
title: string;
|
|
167
|
+
entryPoint: string;
|
|
168
|
+
run(context: JourneyContext): Promise<void>;
|
|
169
|
+
}
|
|
170
|
+
/** An exported function of an interface that is not a proxy, called through core by the driver module. */
|
|
171
|
+
interface InterfaceCall<Api> {
|
|
172
|
+
call(api: Api): Promise<JsonValue>;
|
|
173
|
+
/** The value the call must resolve to. */
|
|
174
|
+
expect: JsonValue;
|
|
175
|
+
}
|
|
176
|
+
/** Repo-owned hooks of the interface kind for contracts that are not interface proxies. */
|
|
177
|
+
interface InterfaceHooks<Api> {
|
|
178
|
+
/** Runs in the stub provider module after the generic stubs attach, for example to call `internal.SetClient`. */
|
|
179
|
+
provide?(api: Api): void | Promise<void>;
|
|
180
|
+
/** Plain exported functions, by path such as `.:GetClient`, called by the driver module. */
|
|
181
|
+
calls?: {
|
|
182
|
+
[path: string]: InterfaceCall<Api>;
|
|
183
|
+
};
|
|
184
|
+
/** Exported functions only a provider calls, by path, with why the consumer never calls them. */
|
|
185
|
+
providerSide?: {
|
|
186
|
+
[path: string]: string;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
/** How the template kind knows the scaffolded project is up. */
|
|
190
|
+
interface TemplateProbe {
|
|
191
|
+
/** A path on the port the harness passes as `PORT`; the welcome page or endpoint. */
|
|
192
|
+
path?: string;
|
|
193
|
+
status?: number;
|
|
194
|
+
body?: RegExp;
|
|
195
|
+
/** A line of `ajs project dev` output that means ready, for a template with no HTTP endpoint. */
|
|
196
|
+
log?: RegExp;
|
|
197
|
+
/** How long the process must keep running after `log` matches, 3000 ms by default: core prints nothing once modules start. */
|
|
198
|
+
settleMs?: number;
|
|
199
|
+
}
|
|
200
|
+
/** The repo-owned layer of a shared verification skill: `.agents/skills/verify-<kind>/verify.config.ts`. */
|
|
201
|
+
interface VerifyConfig<Api = never> {
|
|
202
|
+
doors: DoorRules;
|
|
203
|
+
formal?: FormalCheck[];
|
|
204
|
+
/** Files whose change a user can observe; replaces the kind's default. */
|
|
205
|
+
userFacing?: string[];
|
|
206
|
+
services?: {
|
|
207
|
+
[name: string]: ServiceDefinition;
|
|
208
|
+
};
|
|
209
|
+
/** Extra environment for every driven command. */
|
|
210
|
+
env?: {
|
|
211
|
+
[name: string]: string;
|
|
212
|
+
};
|
|
213
|
+
/** Commands run in the repository by `new`, replacing the default build. */
|
|
214
|
+
setup?: string[][];
|
|
215
|
+
journeys?: {
|
|
216
|
+
[id: string]: Journey;
|
|
217
|
+
};
|
|
218
|
+
/** Provider sandbox keys read from the environment; without every one the run is not verified, never PASS. */
|
|
219
|
+
saas?: {
|
|
220
|
+
env: string[];
|
|
221
|
+
sandbox: string;
|
|
222
|
+
};
|
|
223
|
+
/** The module kind's configuration of the module under verification. */
|
|
224
|
+
moduleConfig?(services: ServiceEndpoint[]): JsonObject;
|
|
225
|
+
interface?: InterfaceHooks<Api>;
|
|
226
|
+
/** The template kind: its name in the offline manifest, whether it is a project template, and its readiness probe. */
|
|
227
|
+
template?: {
|
|
228
|
+
name?: string;
|
|
229
|
+
project?: boolean;
|
|
230
|
+
probe: TemplateProbe;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/verify/checks.d.ts
|
|
235
|
+
interface Exited {
|
|
236
|
+
exitCode: number | null;
|
|
237
|
+
}
|
|
238
|
+
/** The process exited with `code`. */
|
|
239
|
+
declare function exitIs(result: Exited, code: number): Check;
|
|
240
|
+
/** The process ended on SIGINT, by exit code 130 or by the signal itself. */
|
|
241
|
+
declare function interrupted(result: {
|
|
242
|
+
exitCode: number | null;
|
|
243
|
+
signal: string | null;
|
|
244
|
+
}): Check;
|
|
245
|
+
/** `text` matches `pattern`; `label` names the stream. */
|
|
246
|
+
declare function has(label: string, text: string, pattern: RegExp): Check;
|
|
247
|
+
/** `text` does not match `pattern`. */
|
|
248
|
+
declare function lacks(label: string, text: string, pattern: RegExp): Check;
|
|
249
|
+
/** A file or folder exists at `file`. */
|
|
250
|
+
declare function exists(file: string): Check;
|
|
251
|
+
/** The file at `file` matches `pattern`. */
|
|
252
|
+
declare function fileHas(file: string, pattern: RegExp): Check;
|
|
253
|
+
/** Two values are deeply equal once serialized. */
|
|
254
|
+
declare function equal(name: string, actual: JsonValue | undefined, expected: JsonValue): Check;
|
|
255
|
+
/** The request answered `status` (200 by default). */
|
|
256
|
+
declare function answered(result: HttpResult, status?: number): Check;
|
|
257
|
+
/** The request answered 200 with JSON whose `key` is `expected`. */
|
|
258
|
+
declare function answers(result: HttpResult, key: string, expected: JsonValue): Check;
|
|
259
|
+
/** Nothing answered the request. */
|
|
260
|
+
declare function refused(result: HttpResult): Check;
|
|
261
|
+
//#endregion
|
|
262
|
+
export { type App, type CallRequest, type CallResult, type Check, type CommandResult, type DevOptions, type DoorKind, type DoorRule, type DoorRules, type DriveOptions, type FormalCheck, type HttpResult, type InterfaceCall, type InterfaceHooks, type Journey, type JourneyContext, type ServiceDefinition, type ServiceEndpoint, type StopResult, type TemplateProbe, type VerifyConfig, answered, answers, equal, exists, exitIs, fileHas, has, interrupted, lacks, refused };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/tooling-configs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "Shared tooling presets for AntelopeJS repositories: oxlint (with the vendored anti-slop rules), oxfmt, ESLint for Nuxt layers, Knip, and an interface range check",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"antelopejs-garden": "./dist/bin/garden.mjs",
|
|
30
30
|
"antelopejs-ratchet": "./dist/bin/ratchet.mjs",
|
|
31
31
|
"antelopejs-suppressions": "./dist/bin/suppressions.mjs",
|
|
32
|
-
"antelopejs-sync": "./dist/bin/sync.mjs"
|
|
32
|
+
"antelopejs-sync": "./dist/bin/sync.mjs",
|
|
33
|
+
"antelopejs-verify": "./dist/bin/verify.mjs"
|
|
33
34
|
},
|
|
34
35
|
"files": [
|
|
35
36
|
"dist"
|
|
@@ -41,7 +42,8 @@
|
|
|
41
42
|
"./oxc/anti-slop": "./dist/oxc/anti-slop/index.mjs",
|
|
42
43
|
"./oxc/guardrails": "./dist/oxc/guardrails/index.mjs",
|
|
43
44
|
"./knip": "./dist/knip.mjs",
|
|
44
|
-
"./eslint": "./dist/eslint.mjs"
|
|
45
|
+
"./eslint": "./dist/eslint.mjs",
|
|
46
|
+
"./verify": "./dist/verify/index.mjs"
|
|
45
47
|
},
|
|
46
48
|
"publishConfig": {
|
|
47
49
|
"access": "public",
|