@ploaness/cli 1.0.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 +21 -0
- package/README.md +13 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +161 -0
- package/dist/bin.js.map +1 -0
- package/dist/checks/assets.d.ts +30 -0
- package/dist/checks/assets.d.ts.map +1 -0
- package/dist/checks/assets.js +169 -0
- package/dist/checks/assets.js.map +1 -0
- package/dist/checks/containers.d.ts +9 -0
- package/dist/checks/containers.d.ts.map +1 -0
- package/dist/checks/containers.js +194 -0
- package/dist/checks/containers.js.map +1 -0
- package/dist/checks/conventions.d.ts +8 -0
- package/dist/checks/conventions.d.ts.map +1 -0
- package/dist/checks/conventions.js +77 -0
- package/dist/checks/conventions.js.map +1 -0
- package/dist/checks/dependencies.d.ts +11 -0
- package/dist/checks/dependencies.d.ts.map +1 -0
- package/dist/checks/dependencies.js +389 -0
- package/dist/checks/dependencies.js.map +1 -0
- package/dist/checks/editorconfig.d.ts +5 -0
- package/dist/checks/editorconfig.d.ts.map +1 -0
- package/dist/checks/editorconfig.js +38 -0
- package/dist/checks/editorconfig.js.map +1 -0
- package/dist/checks/generated.d.ts +10 -0
- package/dist/checks/generated.d.ts.map +1 -0
- package/dist/checks/generated.js +65 -0
- package/dist/checks/generated.js.map +1 -0
- package/dist/checks/history.d.ts +19 -0
- package/dist/checks/history.d.ts.map +1 -0
- package/dist/checks/history.js +71 -0
- package/dist/checks/history.js.map +1 -0
- package/dist/checks/images.d.ts +14 -0
- package/dist/checks/images.d.ts.map +1 -0
- package/dist/checks/images.js +100 -0
- package/dist/checks/images.js.map +1 -0
- package/dist/checks/install.d.ts +5 -0
- package/dist/checks/install.d.ts.map +1 -0
- package/dist/checks/install.js +21 -0
- package/dist/checks/install.js.map +1 -0
- package/dist/checks/integrity.d.ts +11 -0
- package/dist/checks/integrity.d.ts.map +1 -0
- package/dist/checks/integrity.js +66 -0
- package/dist/checks/integrity.js.map +1 -0
- package/dist/checks/payload.d.ts +7 -0
- package/dist/checks/payload.d.ts.map +1 -0
- package/dist/checks/payload.js +81 -0
- package/dist/checks/payload.js.map +1 -0
- package/dist/checks/preflight.d.ts +5 -0
- package/dist/checks/preflight.d.ts.map +1 -0
- package/dist/checks/preflight.js +48 -0
- package/dist/checks/preflight.js.map +1 -0
- package/dist/checks/references.d.ts +18 -0
- package/dist/checks/references.d.ts.map +1 -0
- package/dist/checks/references.js +100 -0
- package/dist/checks/references.js.map +1 -0
- package/dist/checks/suppressions.d.ts +5 -0
- package/dist/checks/suppressions.d.ts.map +1 -0
- package/dist/checks/suppressions.js +50 -0
- package/dist/checks/suppressions.js.map +1 -0
- package/dist/checks/tailwind.d.ts +5 -0
- package/dist/checks/tailwind.d.ts.map +1 -0
- package/dist/checks/tailwind.js +29 -0
- package/dist/checks/tailwind.js.map +1 -0
- package/dist/checks/tests.d.ts +8 -0
- package/dist/checks/tests.d.ts.map +1 -0
- package/dist/checks/tests.js +123 -0
- package/dist/checks/tests.js.map +1 -0
- package/dist/checks/toolchain.d.ts +25 -0
- package/dist/checks/toolchain.d.ts.map +1 -0
- package/dist/checks/toolchain.js +165 -0
- package/dist/checks/toolchain.js.map +1 -0
- package/dist/checks/tree.d.ts +6 -0
- package/dist/checks/tree.d.ts.map +1 -0
- package/dist/checks/tree.js +52 -0
- package/dist/checks/tree.js.map +1 -0
- package/dist/checks/wiring.d.ts +5 -0
- package/dist/checks/wiring.d.ts.map +1 -0
- package/dist/checks/wiring.js +163 -0
- package/dist/checks/wiring.js.map +1 -0
- package/dist/commands/commit-message.d.ts +11 -0
- package/dist/commands/commit-message.d.ts.map +1 -0
- package/dist/commands/commit-message.js +57 -0
- package/dist/commands/commit-message.js.map +1 -0
- package/dist/commands/format.d.ts +4 -0
- package/dist/commands/format.d.ts.map +1 -0
- package/dist/commands/format.js +35 -0
- package/dist/commands/format.js.map +1 -0
- package/dist/commands/hooks.d.ts +9 -0
- package/dist/commands/hooks.d.ts.map +1 -0
- package/dist/commands/hooks.js +57 -0
- package/dist/commands/hooks.js.map +1 -0
- package/dist/commands/init.d.ts +4 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +92 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/sync.d.ts +4 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +30 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/verify.d.ts +18 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +96 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/context.d.ts +157 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +345 -0
- package/dist/context.js.map +1 -0
- package/dist/exec.d.ts +80 -0
- package/dist/exec.d.ts.map +1 -0
- package/dist/exec.js +117 -0
- package/dist/exec.js.map +1 -0
- package/dist/gates.d.ts +61 -0
- package/dist/gates.d.ts.map +1 -0
- package/dist/gates.js +298 -0
- package/dist/gates.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/report.d.ts +40 -0
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +224 -0
- package/dist/report.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,QA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AC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CACvC,CAAC,CAAC,CAAC,CAAA;IACN,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC9B,CAAC;IACD,OAAO,CACL,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAc,EAAW,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC;QACpF,YAAY,CAAC;YACX,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,WAAW,EAAE,SAAS,CAAC,IAAI;YAC3B,UAAU,EAAE,UAAU,CAAC,UAAU;SAClC,CAAC,CACH,CAAA;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAgB,EAAoC,EAAE,CACnF,uBAAuB,CACrB,OAAO,CAAC,GAAG,EACX,mBAAmB,CAAC,CAAC,YAAoB,EAAW,EAAE,CACpD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAClD,CAAC,GAAG,CACH,CAAC,IAAY,EAAgD,EAAE,CAC7D,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAChE,CACF,CAAA"}
|
package/dist/exec.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/** The outcome of one gate. */
|
|
2
|
+
export interface GateResult {
|
|
3
|
+
readonly ok: boolean;
|
|
4
|
+
/** Lines the user must act on when the gate fails, or an informational report when it passes. */
|
|
5
|
+
readonly findings: readonly string[];
|
|
6
|
+
/** One line summarising what the gate observed. */
|
|
7
|
+
readonly summary: string;
|
|
8
|
+
/**
|
|
9
|
+
* What the underlying tool actually printed, kept whole and printed only on request.
|
|
10
|
+
*
|
|
11
|
+
* Deliberately apart from `findings`, whose contract is the lines a user must ACT on: a passing
|
|
12
|
+
* gate's output is not that, and merging the two would make a gate that found nothing read as
|
|
13
|
+
* though it had. Held so a reader can audit a verdict rather than take it on faith - "no
|
|
14
|
+
* vulnerability at or above moderate" is a claim, and this is the evidence for it.
|
|
15
|
+
*/
|
|
16
|
+
readonly output?: string;
|
|
17
|
+
}
|
|
18
|
+
/** A passing result, optionally carrying a non-failing report. */
|
|
19
|
+
export declare const passed: (summary: string, findings?: readonly string[]) => GateResult;
|
|
20
|
+
/** A failing result carrying the findings the user must act on. */
|
|
21
|
+
export declare const failed: (summary: string, findings: readonly string[]) => GateResult;
|
|
22
|
+
/** The same result, carrying the tool output that produced it. */
|
|
23
|
+
export declare const withOutput: (result: GateResult, output: string) => GateResult;
|
|
24
|
+
/** Where and how to run a child process. */
|
|
25
|
+
export interface RunOptions {
|
|
26
|
+
readonly cwd: string;
|
|
27
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
28
|
+
/** Text to write to the child's stdin, for a tool that reads its subject there. */
|
|
29
|
+
readonly input?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Kill the tool after this many milliseconds, reporting `TIMED_OUT_CODE`.
|
|
32
|
+
*
|
|
33
|
+
* Omitted means the tool decides when it is done, which is right for an analyzer reading the tree and
|
|
34
|
+
* wrong for anything that opens a socket. A hung request produced no output and no verdict, so on a
|
|
35
|
+
* team's CI a stuck gate was indistinguishable from a stuck build - and unlike a gate failure, nothing
|
|
36
|
+
* said which it was, because nothing ended.
|
|
37
|
+
*/
|
|
38
|
+
readonly timeoutMs?: number;
|
|
39
|
+
}
|
|
40
|
+
/** The raw outcome of a child process. */
|
|
41
|
+
export interface RunResult {
|
|
42
|
+
readonly code: number;
|
|
43
|
+
/** Both streams together, which is what a finding shows the user. */
|
|
44
|
+
readonly output: string;
|
|
45
|
+
/**
|
|
46
|
+
* Standard output alone.
|
|
47
|
+
*
|
|
48
|
+
* A caller that PARSES the output must read this. `output` concatenates the two streams with no
|
|
49
|
+
* separator, and pnpm writes ` WARN ` lines to stderr as a matter of course - an unsupported engine,
|
|
50
|
+
* an ignored build script, a peer conflict. Feeding that to `JSON.parse` made the licence and
|
|
51
|
+
* advisory gates fail closed while blaming the registry for a warning the tool had merely mentioned.
|
|
52
|
+
*/
|
|
53
|
+
readonly stdout: string;
|
|
54
|
+
}
|
|
55
|
+
/** The exit status reported for a tool killed for exceeding the deadline its caller set. */
|
|
56
|
+
export declare const TIMED_OUT_CODE: number;
|
|
57
|
+
export { COMMAND_NOT_FOUND } from '@ploaness/governance';
|
|
58
|
+
export declare const run: (command: string, commandArguments: readonly string[], options: RunOptions) => RunResult;
|
|
59
|
+
/** Run a Node-based tool through the current interpreter, so no shim or PATH entry is required. */
|
|
60
|
+
export declare const runNode: (script: string, commandArguments: readonly string[], options: RunOptions) => RunResult;
|
|
61
|
+
/**
|
|
62
|
+
* Split a tool's combined output into findings, collapsing an empty report to a single marker line.
|
|
63
|
+
* @param output the tool's own text.
|
|
64
|
+
* @returns one entry per line, with CRLF endings normalised so no finding carries a stray `\r`.
|
|
65
|
+
*/
|
|
66
|
+
export declare const asFindings: (output: string) => readonly string[];
|
|
67
|
+
/**
|
|
68
|
+
* Turn a child-process outcome into a gate result.
|
|
69
|
+
*
|
|
70
|
+
* Two summaries, not one. Every call site phrases its summary as an assertion that the check passed -
|
|
71
|
+
* "module architecture holds", "no dead code or unused dependency" - and the report prints the summary
|
|
72
|
+
* for whichever verdict it got. So a failing run announced itself as `x knip no dead code or unused
|
|
73
|
+
* dependency`, which is the gate contradicting itself on the line the reader looks at first.
|
|
74
|
+
* @param result the child-process outcome.
|
|
75
|
+
* @param passSummary what is true when the tool exits zero.
|
|
76
|
+
* @param failSummary what to say when it does not.
|
|
77
|
+
* @returns the gate result, carrying the tool's own output on failure.
|
|
78
|
+
*/
|
|
79
|
+
export declare const fromRun: (result: RunResult, passSummary: string, failSummary: string) => GateResult;
|
|
80
|
+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,CAAA;CACxB;AAmBD,4FAA4F;AAC5F,eAAO,MAAM,cAAc,EAAE,MAAY,CAAA;AAezC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AA8BxD,eAAO,MAAM,GAAG,GACd,SAAS,MAAM,EACf,kBAAkB,SAAS,MAAM,EAAE,EACnC,SAAS,UAAU,KAClB,SAmBF,CAAA;AAED,mGAAmG;AACnG,eAAO,MAAM,OAAO,GAClB,QAAQ,MAAM,EACd,kBAAkB,SAAS,MAAM,EAAE,EACnC,SAAS,UAAU,KAClB,SAA0E,CAAA;AAE7E;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,KAAG,SAAS,MAAM,EAGpB,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,GAAI,QAAQ,SAAS,EAAE,aAAa,MAAM,EAAE,aAAa,MAAM,KAAG,UAInF,CAAA"}
|
package/dist/exec.js
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Process execution for the gates, and the single result shape every gate returns. A uniform shape lets
|
|
2
|
+
// the runner present one verdict whether a gate shelled out to a tool or evaluated a rule in process.
|
|
3
|
+
import { spawnSync } from 'node:child_process';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
// Owned by `governance` because the docker-failure classifier decides on it too, and a number two
|
|
6
|
+
// modules must agree about will not stay agreed about while each states it.
|
|
7
|
+
import { COMMAND_NOT_FOUND } from '@ploaness/governance';
|
|
8
|
+
/** A passing result, optionally carrying a non-failing report. */
|
|
9
|
+
export const passed = (summary, findings = []) => ({
|
|
10
|
+
ok: true,
|
|
11
|
+
findings,
|
|
12
|
+
summary,
|
|
13
|
+
});
|
|
14
|
+
/** A failing result carrying the findings the user must act on. */
|
|
15
|
+
export const failed = (summary, findings) => ({
|
|
16
|
+
ok: false,
|
|
17
|
+
findings,
|
|
18
|
+
summary,
|
|
19
|
+
});
|
|
20
|
+
/** The same result, carrying the tool output that produced it. */
|
|
21
|
+
export const withOutput = (result, output) => output.length > 0 ? { ...result, output } : result;
|
|
22
|
+
const BYTES_PER_KIB = 1024;
|
|
23
|
+
const KIB_PER_MIB = 1024;
|
|
24
|
+
// Large enough that no analyzer's output is truncated before it can be reported.
|
|
25
|
+
const MAX_OUTPUT_MIB = 64;
|
|
26
|
+
const MAX_OUTPUT_BYTES = MAX_OUTPUT_MIB * KIB_PER_MIB * BYTES_PER_KIB;
|
|
27
|
+
// A tool that could not start and a tool that produced more output than the buffer holds are different
|
|
28
|
+
// problems, and reporting both as 127 made the second read as "Docker is not available". The buffer
|
|
29
|
+
// case is named for what it is.
|
|
30
|
+
// The third case is a tool killed for exceeding its deadline. It is not a tool that is missing, and
|
|
31
|
+
// saying "not installed" about a registry that merely hung sends a team looking for the wrong thing.
|
|
32
|
+
//
|
|
33
|
+
// Matched on the message because node writes it - `spawnSync <cmd> ETIMEDOUT` - so no output a tool
|
|
34
|
+
// produced can reach this decision, which is the same guarantee the `maxBuffer` line already relies on.
|
|
35
|
+
const OUT_OF_BUFFER = 'ENOBUFS';
|
|
36
|
+
const TIMED_OUT = 'ETIMEDOUT';
|
|
37
|
+
/** The exit status reported for a tool killed for exceeding the deadline its caller set. */
|
|
38
|
+
export const TIMED_OUT_CODE = 124;
|
|
39
|
+
const startupFailure = (error) => {
|
|
40
|
+
if (error.message.includes('maxBuffer')) {
|
|
41
|
+
return {
|
|
42
|
+
code: 1,
|
|
43
|
+
output: `${OUT_OF_BUFFER}: the tool produced more than ${String(MAX_OUTPUT_MIB)} MiB of output`,
|
|
44
|
+
stdout: '',
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return error.message.includes(TIMED_OUT)
|
|
48
|
+
? { code: TIMED_OUT_CODE, output: `${TIMED_OUT}: ${error.message}`, stdout: '' }
|
|
49
|
+
: { code: COMMAND_NOT_FOUND, output: error.message, stdout: '' };
|
|
50
|
+
};
|
|
51
|
+
export { COMMAND_NOT_FOUND } from '@ploaness/governance';
|
|
52
|
+
// A process killed by a signal reports no status at all, and reporting it as an ordinary failure hid
|
|
53
|
+
// the one fact that explains it - an out-of-memory kill during a build looks exactly like a build that
|
|
54
|
+
// found an error.
|
|
55
|
+
const describeSignal = (signal) => signal === null ? [] : [`the process was killed by ${signal}`];
|
|
56
|
+
/** Run a command, capturing stdout and stderr both together and apart. */
|
|
57
|
+
// `runNode` invokes a tool through the interpreter so ploaness needs no shim of its own, but a tool it
|
|
58
|
+
// starts can start further processes, and those resolve through PATH like anything else. Playwright's
|
|
59
|
+
// `webServer` runs `next dev` through `/bin/sh`, which found nothing: the project's `node_modules/.bin`
|
|
60
|
+
// was on PATH only for a project whose `testWrapper` happened to route the run through a package
|
|
61
|
+
// manager, because that is what puts it there. The e2e gate therefore passed or failed on whether the
|
|
62
|
+
// project had declared an unrelated setting. Prepending it here makes the child's PATH the same either
|
|
63
|
+
// way, and prepending rather than appending keeps the project's own copy of a tool ahead of any
|
|
64
|
+
// same-named one already on PATH.
|
|
65
|
+
const withProjectBinaries = (cwd, overrides) => {
|
|
66
|
+
const binaries = path.join(cwd, 'node_modules', '.bin');
|
|
67
|
+
const inherited = process.env['PATH'];
|
|
68
|
+
return {
|
|
69
|
+
...process.env,
|
|
70
|
+
...overrides,
|
|
71
|
+
PATH: inherited === undefined ? binaries : `${binaries}${path.delimiter}${inherited}`,
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export const run = (command, commandArguments, options) => {
|
|
75
|
+
const result = spawnSync(command, [...commandArguments], {
|
|
76
|
+
cwd: options.cwd,
|
|
77
|
+
encoding: 'utf8',
|
|
78
|
+
maxBuffer: MAX_OUTPUT_BYTES,
|
|
79
|
+
env: withProjectBinaries(options.cwd, options.env),
|
|
80
|
+
...(options.input !== undefined && { input: options.input }),
|
|
81
|
+
...(options.timeoutMs !== undefined && { timeout: options.timeoutMs }),
|
|
82
|
+
});
|
|
83
|
+
if (result.error !== undefined) {
|
|
84
|
+
return startupFailure(result.error);
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
code: result.status ?? 1,
|
|
88
|
+
output: [`${result.stdout}${result.stderr}`.trim(), ...describeSignal(result.signal)]
|
|
89
|
+
.filter((part) => part.length > 0)
|
|
90
|
+
.join('\n'),
|
|
91
|
+
stdout: result.stdout,
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
/** Run a Node-based tool through the current interpreter, so no shim or PATH entry is required. */
|
|
95
|
+
export const runNode = (script, commandArguments, options) => run(process.execPath, [script, ...commandArguments], options);
|
|
96
|
+
/**
|
|
97
|
+
* Split a tool's combined output into findings, collapsing an empty report to a single marker line.
|
|
98
|
+
* @param output the tool's own text.
|
|
99
|
+
* @returns one entry per line, with CRLF endings normalised so no finding carries a stray `\r`.
|
|
100
|
+
*/
|
|
101
|
+
export const asFindings = (output) => output.length > 0
|
|
102
|
+
? output.replaceAll('\r\n', '\n').split('\n')
|
|
103
|
+
: ['(the tool produced no output)'];
|
|
104
|
+
/**
|
|
105
|
+
* Turn a child-process outcome into a gate result.
|
|
106
|
+
*
|
|
107
|
+
* Two summaries, not one. Every call site phrases its summary as an assertion that the check passed -
|
|
108
|
+
* "module architecture holds", "no dead code or unused dependency" - and the report prints the summary
|
|
109
|
+
* for whichever verdict it got. So a failing run announced itself as `x knip no dead code or unused
|
|
110
|
+
* dependency`, which is the gate contradicting itself on the line the reader looks at first.
|
|
111
|
+
* @param result the child-process outcome.
|
|
112
|
+
* @param passSummary what is true when the tool exits zero.
|
|
113
|
+
* @param failSummary what to say when it does not.
|
|
114
|
+
* @returns the gate result, carrying the tool's own output on failure.
|
|
115
|
+
*/
|
|
116
|
+
export const fromRun = (result, passSummary, failSummary) => withOutput(result.code === 0 ? passed(passSummary) : failed(failSummary, asFindings(result.output)), result.output);
|
|
117
|
+
//# sourceMappingURL=exec.js.map
|
package/dist/exec.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":"AA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AAM,CAAC,MAAM,OAAO,GAAG,CACrB,MAAc,EACd,gBAAmC,EACnC,OAAmB,EACR,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,EAAE,OAAO,CAAC,CAAA;AAE7E;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAc,EAAqB,EAAE,CAC9D,MAAM,CAAC,MAAM,GAAG,CAAC;IACf,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;IAC7C,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAAiB,EAAE,WAAmB,EAAE,WAAmB,EAAc,EAAE,CACjG,UAAU,CACR,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EACxF,MAAM,CAAC,MAAM,CACd,CAAA"}
|
package/dist/gates.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Member, Repository as Repo } from './context.js';
|
|
2
|
+
import type { GateResult } from './exec.js';
|
|
3
|
+
/** What every gate declares, whatever it judges. */
|
|
4
|
+
interface GateMeta {
|
|
5
|
+
/** Stable identifier, usable with `ploaness gate <id>`. */
|
|
6
|
+
readonly id: string;
|
|
7
|
+
/** What the gate is checking, shown in the run log. */
|
|
8
|
+
readonly title: string;
|
|
9
|
+
/** True when the gate belongs to extended verification only. */
|
|
10
|
+
readonly isExtended: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* True when a failure here makes every later gate meaningless rather than merely unreported, which is
|
|
13
|
+
* what stops even a report-only run. `preflight` decides whether ploaness may judge this project at
|
|
14
|
+
* all, and `wiring` decides whether it is judging the project ploaness thinks it is. Past a failing
|
|
15
|
+
* `wiring` the toolchain, the configurations, and the pinned versions are no longer the ones ploaness
|
|
16
|
+
* vouches for, so a survey of findings below it would be a list of verdicts about nothing.
|
|
17
|
+
*/
|
|
18
|
+
readonly isPrecondition?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* One verification gate, discriminated by what it judges.
|
|
22
|
+
*
|
|
23
|
+
* The union is what stops a repository-scope gate being handed a member's directory - the mistake that
|
|
24
|
+
* made `install-scripts` demand a workspace file inside a package, and made the overrides check vouch
|
|
25
|
+
* for pins it had not read. A check written against `Context` still satisfies either arm, because both
|
|
26
|
+
* carry the fields it always used.
|
|
27
|
+
*/
|
|
28
|
+
export type Gate = (GateMeta & {
|
|
29
|
+
readonly scope: 'repository';
|
|
30
|
+
readonly run: (repo: Repo) => GateResult | Promise<GateResult>;
|
|
31
|
+
}) | (GateMeta & {
|
|
32
|
+
readonly scope: 'package' | 'payload';
|
|
33
|
+
readonly run: (member: Member) => GateResult | Promise<GateResult>;
|
|
34
|
+
});
|
|
35
|
+
/** Every gate ploaness knows, in run order. */
|
|
36
|
+
export declare const ALL_GATES: readonly Gate[];
|
|
37
|
+
/**
|
|
38
|
+
* The gates for one verification mode. Extended verification includes Default verification: the extra
|
|
39
|
+
* gates are added rather than substituted, so `--extended` is never a different verdict about less.
|
|
40
|
+
*/
|
|
41
|
+
export declare const gatesFor: (isExtended: boolean) => readonly Gate[];
|
|
42
|
+
/** Look up one gate by identifier. */
|
|
43
|
+
export declare const gateById: (id: string) => Gate | undefined;
|
|
44
|
+
/** One gate invocation: the gate, and the member it is about when it has one. */
|
|
45
|
+
export interface PlannedGate {
|
|
46
|
+
readonly gate: Gate;
|
|
47
|
+
readonly member: Member | undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Expand the registry into the invocations one run performs against this repository.
|
|
51
|
+
*
|
|
52
|
+
* The ordering rule itself lives in governance, where it is spec'd against the sequence that shipped
|
|
53
|
+
* before members existed; this only zips that plan back onto the registry entries and the member
|
|
54
|
+
* objects the gates are actually handed.
|
|
55
|
+
* @param repository the repository being judged.
|
|
56
|
+
* @param isExtended whether extended verification's gates are included.
|
|
57
|
+
* @returns one planned invocation per step, in run order.
|
|
58
|
+
*/
|
|
59
|
+
export declare const planFor: (repository: Repo, isExtended: boolean) => readonly PlannedGate[];
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=gates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gates.d.ts","sourceRoot":"","sources":["../src/gates.ts"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,IAAI,IAAI,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,oDAAoD;AACpD,UAAU,QAAQ;IAChB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,gEAAgE;IAChE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;CAClC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,IAAI,GACZ,CAAC,QAAQ,GAAG;IACV,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;IAC5B,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;CAC/D,CAAC,GACF,CAAC,QAAQ,GAAG;IACV,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAA;IACrC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;CACnE,CAAC,CAAA;AA2ON,+CAA+C;AAC/C,eAAO,MAAM,SAAS,EAAE,SAAS,IAAI,EAAuD,CAAA;AAE5F;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,YAAY,OAAO,KAAG,SAAS,IAAI,EACF,CAAA;AAE1D,sCAAsC;AACtC,eAAO,MAAM,QAAQ,GAAI,IAAI,MAAM,KAAG,IAAI,GAAG,SACY,CAAA;AAEzD,iFAAiF;AACjF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC;AAQD;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,GAAI,YAAY,IAAI,EAAE,YAAY,OAAO,KAAG,SAAS,WAAW,EAsBnF,CAAA"}
|
package/dist/gates.js
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
// The ordered gate registry. The run stops at the first failing gate, so order decides which finding a
|
|
2
|
+
// project sees first and is deliberate twice over: the cheap structural checks that tell a project it is
|
|
3
|
+
// not wired correctly run before the expensive ones that would otherwise fail confusingly, and the tree
|
|
4
|
+
// fingerprint is taken before anything that could rewrite a file and read back after everything has run
|
|
5
|
+
// - in extended verification too, which is where the gate most needs to look and where it used to run
|
|
6
|
+
// before the build rather than after it.
|
|
7
|
+
//
|
|
8
|
+
// `preflight` and `wiring` lead, and they are the two preconditions: they decide whether ploaness may
|
|
9
|
+
// judge this project at all, and whether what it is judging is what it thinks. Past a failing one,
|
|
10
|
+
// nothing below means what it says, which is why they stop even a report-only run.
|
|
11
|
+
import { planSteps, } from '@ploaness/governance';
|
|
12
|
+
import { assets } from './checks/assets.js';
|
|
13
|
+
import { actions, containers, secrets } from './checks/containers.js';
|
|
14
|
+
import { conventions } from './checks/conventions.js';
|
|
15
|
+
import { dependencyFreshness, licenses, vulnerabilities } from './checks/dependencies.js';
|
|
16
|
+
import { editorconfig } from './checks/editorconfig.js';
|
|
17
|
+
import { generatedDenial } from './checks/generated.js';
|
|
18
|
+
import { commitHistory, linearHistory, requireFullHistory } from './checks/history.js';
|
|
19
|
+
import { installScripts } from './checks/install.js';
|
|
20
|
+
import { bundle, imageAssets } from './checks/integrity.js';
|
|
21
|
+
import { payloadGenerated, payloadRules } from './checks/payload.js';
|
|
22
|
+
import { preflight } from './checks/preflight.js';
|
|
23
|
+
import { configReferences, documentation, skills } from './checks/references.js';
|
|
24
|
+
import { suppressions } from './checks/suppressions.js';
|
|
25
|
+
import { tailwindTokens } from './checks/tailwind.js';
|
|
26
|
+
import { build, endToEnd, tests } from './checks/tests.js';
|
|
27
|
+
import { architecture, biome, biomeSchema, css, eslint, knip, typeCoverage, types, } from './checks/toolchain.js';
|
|
28
|
+
import { treeSnapshot, treeVerify } from './checks/tree.js';
|
|
29
|
+
import { wiring } from './checks/wiring.js';
|
|
30
|
+
/** Default verification: the gates that run on every invocation. */
|
|
31
|
+
const DEFAULT_GATES = [
|
|
32
|
+
{
|
|
33
|
+
id: 'preflight',
|
|
34
|
+
scope: 'repository',
|
|
35
|
+
title: 'supported Payload project',
|
|
36
|
+
isExtended: false,
|
|
37
|
+
isPrecondition: true,
|
|
38
|
+
run: preflight,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'wiring',
|
|
42
|
+
scope: 'repository',
|
|
43
|
+
title: 'harness wiring',
|
|
44
|
+
isExtended: false,
|
|
45
|
+
isPrecondition: true,
|
|
46
|
+
run: wiring,
|
|
47
|
+
},
|
|
48
|
+
{ id: 'assets', scope: 'repository', title: 'managed files', isExtended: false, run: assets },
|
|
49
|
+
{
|
|
50
|
+
id: 'tree-snapshot',
|
|
51
|
+
scope: 'repository',
|
|
52
|
+
title: 'working-tree fingerprint',
|
|
53
|
+
isExtended: false,
|
|
54
|
+
run: treeSnapshot,
|
|
55
|
+
},
|
|
56
|
+
{ id: 'types', scope: 'package', title: 'strict type check', isExtended: false, run: types },
|
|
57
|
+
{
|
|
58
|
+
id: 'biome',
|
|
59
|
+
scope: 'package',
|
|
60
|
+
title: 'formatting and fast lint',
|
|
61
|
+
isExtended: false,
|
|
62
|
+
run: biome,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'biome-schema',
|
|
66
|
+
scope: 'repository',
|
|
67
|
+
title: 'Biome schema drift',
|
|
68
|
+
isExtended: false,
|
|
69
|
+
run: biomeSchema,
|
|
70
|
+
},
|
|
71
|
+
{ id: 'eslint', scope: 'package', title: 'type-aware lint', isExtended: false, run: eslint },
|
|
72
|
+
{
|
|
73
|
+
id: 'conventions',
|
|
74
|
+
scope: 'repository',
|
|
75
|
+
title: 'source conventions',
|
|
76
|
+
isExtended: false,
|
|
77
|
+
run: conventions,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'editorconfig',
|
|
81
|
+
scope: 'repository',
|
|
82
|
+
title: 'committed formatting',
|
|
83
|
+
isExtended: false,
|
|
84
|
+
run: editorconfig,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'suppressions',
|
|
88
|
+
scope: 'package',
|
|
89
|
+
title: 'suppression ceiling',
|
|
90
|
+
isExtended: false,
|
|
91
|
+
run: suppressions,
|
|
92
|
+
},
|
|
93
|
+
{ id: 'css', scope: 'package', title: 'style sheets', isExtended: false, run: css },
|
|
94
|
+
{
|
|
95
|
+
id: 'tailwind-tokens',
|
|
96
|
+
scope: 'package',
|
|
97
|
+
title: 'token-bound Tailwind values',
|
|
98
|
+
isExtended: false,
|
|
99
|
+
run: tailwindTokens,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'arch',
|
|
103
|
+
scope: 'package',
|
|
104
|
+
title: 'module architecture',
|
|
105
|
+
isExtended: false,
|
|
106
|
+
run: architecture,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: 'type-coverage',
|
|
110
|
+
scope: 'package',
|
|
111
|
+
title: 'type coverage',
|
|
112
|
+
isExtended: false,
|
|
113
|
+
run: typeCoverage,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: 'payload-generated',
|
|
117
|
+
scope: 'payload',
|
|
118
|
+
title: 'generated Payload artefacts',
|
|
119
|
+
isExtended: false,
|
|
120
|
+
run: payloadGenerated,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: 'generated-denial',
|
|
124
|
+
scope: 'repository',
|
|
125
|
+
title: 'generated files denied',
|
|
126
|
+
isExtended: false,
|
|
127
|
+
run: generatedDenial,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: 'payload-rules',
|
|
131
|
+
// Package rather than payload scope: the import rule inside it is about the language, and holding
|
|
132
|
+
// it here meant it ran only where Payload did.
|
|
133
|
+
scope: 'package',
|
|
134
|
+
title: 'source usage rules',
|
|
135
|
+
isExtended: false,
|
|
136
|
+
run: payloadRules,
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 'config-refs',
|
|
140
|
+
scope: 'package',
|
|
141
|
+
title: 'config references',
|
|
142
|
+
isExtended: false,
|
|
143
|
+
run: configReferences,
|
|
144
|
+
},
|
|
145
|
+
{ id: 'secrets', scope: 'repository', title: 'secret scan', isExtended: false, run: secrets },
|
|
146
|
+
{
|
|
147
|
+
id: 'licenses',
|
|
148
|
+
scope: 'repository',
|
|
149
|
+
title: 'dependency licenses',
|
|
150
|
+
isExtended: false,
|
|
151
|
+
run: licenses,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: 'vulnerabilities',
|
|
155
|
+
scope: 'repository',
|
|
156
|
+
title: 'known vulnerabilities',
|
|
157
|
+
isExtended: false,
|
|
158
|
+
run: vulnerabilities,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: 'install-scripts',
|
|
162
|
+
scope: 'repository',
|
|
163
|
+
title: 'install-script allowlist',
|
|
164
|
+
isExtended: false,
|
|
165
|
+
run: installScripts,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: 'deps',
|
|
169
|
+
scope: 'repository',
|
|
170
|
+
title: 'dependency freshness',
|
|
171
|
+
isExtended: false,
|
|
172
|
+
run: dependencyFreshness,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: 'image-assets',
|
|
176
|
+
scope: 'repository',
|
|
177
|
+
title: 'image integrity',
|
|
178
|
+
isExtended: false,
|
|
179
|
+
run: imageAssets,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: 'docs',
|
|
183
|
+
scope: 'repository',
|
|
184
|
+
title: 'agent documentation references',
|
|
185
|
+
isExtended: false,
|
|
186
|
+
// The gate identifiers are supplied as reserved words: documenting a gate must not be read as a
|
|
187
|
+
// reference to a script that no longer exists, since the two share a vocabulary. ALL_GATES is read
|
|
188
|
+
// when the gate runs, by which point this module has finished initialising.
|
|
189
|
+
run: (repository) => documentation(repository, new Set(ALL_GATES.map((gate) => gate.id))),
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: 'skills',
|
|
193
|
+
scope: 'repository',
|
|
194
|
+
title: 'agent skill manifests',
|
|
195
|
+
isExtended: false,
|
|
196
|
+
run: skills,
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: 'docker',
|
|
200
|
+
scope: 'repository',
|
|
201
|
+
title: 'container definitions',
|
|
202
|
+
isExtended: false,
|
|
203
|
+
run: containers,
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
id: 'actions',
|
|
207
|
+
scope: 'repository',
|
|
208
|
+
title: 'workflow definitions',
|
|
209
|
+
isExtended: false,
|
|
210
|
+
run: actions,
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
id: 'knip',
|
|
214
|
+
scope: 'package',
|
|
215
|
+
title: 'dead code and unused dependencies',
|
|
216
|
+
isExtended: false,
|
|
217
|
+
run: knip,
|
|
218
|
+
},
|
|
219
|
+
{ id: 'tests', scope: 'package', title: 'suite and coverage', isExtended: false, run: tests },
|
|
220
|
+
];
|
|
221
|
+
/** Extended verification adds history, build, bundle, and end-to-end checks. */
|
|
222
|
+
const EXTENDED_GATES = [
|
|
223
|
+
{
|
|
224
|
+
id: 'require-full-history',
|
|
225
|
+
scope: 'repository',
|
|
226
|
+
title: 'full history present',
|
|
227
|
+
isExtended: true,
|
|
228
|
+
run: requireFullHistory,
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
id: 'commit-history',
|
|
232
|
+
scope: 'repository',
|
|
233
|
+
title: 'commit messages across the whole history',
|
|
234
|
+
isExtended: true,
|
|
235
|
+
run: commitHistory,
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: 'linear-history',
|
|
239
|
+
scope: 'repository',
|
|
240
|
+
title: 'linear history',
|
|
241
|
+
isExtended: true,
|
|
242
|
+
run: linearHistory,
|
|
243
|
+
},
|
|
244
|
+
{ id: 'build', scope: 'package', title: 'production build', isExtended: true, run: build },
|
|
245
|
+
{ id: 'bundle', scope: 'package', title: 'client bundle budget', isExtended: true, run: bundle },
|
|
246
|
+
{ id: 'e2e', scope: 'package', title: 'end-to-end suite', isExtended: true, run: endToEnd },
|
|
247
|
+
];
|
|
248
|
+
// Last in BOTH modes, which it was not. It closed `DEFAULT_GATES`, and the extended gates were appended
|
|
249
|
+
// after it - so `build`, `bundle`, and `e2e` all ran once the fingerprint had already been compared.
|
|
250
|
+
// `next build` rewriting a tracked file is exactly what this gate exists to catch, and extended
|
|
251
|
+
// verification was the one mode that could not see it.
|
|
252
|
+
const TREE_VERIFY = {
|
|
253
|
+
id: 'tree-verify',
|
|
254
|
+
scope: 'repository',
|
|
255
|
+
title: 'working tree unchanged',
|
|
256
|
+
isExtended: false,
|
|
257
|
+
run: treeVerify,
|
|
258
|
+
};
|
|
259
|
+
/** Every gate ploaness knows, in run order. */
|
|
260
|
+
export const ALL_GATES = [...DEFAULT_GATES, ...EXTENDED_GATES, TREE_VERIFY];
|
|
261
|
+
/**
|
|
262
|
+
* The gates for one verification mode. Extended verification includes Default verification: the extra
|
|
263
|
+
* gates are added rather than substituted, so `--extended` is never a different verdict about less.
|
|
264
|
+
*/
|
|
265
|
+
export const gatesFor = (isExtended) => isExtended ? ALL_GATES : [...DEFAULT_GATES, TREE_VERIFY];
|
|
266
|
+
/** Look up one gate by identifier. */
|
|
267
|
+
export const gateById = (id) => ALL_GATES.find((gate) => gate.id === id);
|
|
268
|
+
const describe = (gate) => ({
|
|
269
|
+
id: gate.id,
|
|
270
|
+
scope: gate.scope,
|
|
271
|
+
isExtended: gate.isExtended,
|
|
272
|
+
});
|
|
273
|
+
/**
|
|
274
|
+
* Expand the registry into the invocations one run performs against this repository.
|
|
275
|
+
*
|
|
276
|
+
* The ordering rule itself lives in governance, where it is spec'd against the sequence that shipped
|
|
277
|
+
* before members existed; this only zips that plan back onto the registry entries and the member
|
|
278
|
+
* objects the gates are actually handed.
|
|
279
|
+
* @param repository the repository being judged.
|
|
280
|
+
* @param isExtended whether extended verification's gates are included.
|
|
281
|
+
* @returns one planned invocation per step, in run order.
|
|
282
|
+
*/
|
|
283
|
+
export const planFor = (repository, isExtended) => {
|
|
284
|
+
const members = repository.members.map((member) => ({ path: member.path, isPayload: member.isPayload }));
|
|
285
|
+
return planSteps(ALL_GATES.map((gate) => describe(gate)), members, isExtended).flatMap((step) => {
|
|
286
|
+
const gate = gateById(step.gateId);
|
|
287
|
+
if (gate === undefined) {
|
|
288
|
+
return [];
|
|
289
|
+
}
|
|
290
|
+
return [
|
|
291
|
+
{
|
|
292
|
+
gate,
|
|
293
|
+
member: repository.members.find((candidate) => candidate.path === step.member),
|
|
294
|
+
},
|
|
295
|
+
];
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
//# sourceMappingURL=gates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gates.js","sourceRoot":"","sources":["../src/gates.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,yGAAyG;AACzG,wGAAwG;AACxG,wGAAwG;AACxG,sGAA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AAE,IAAI,CAAC,EAAE;IACX,KAAK,EAAE,IAAI,CAAC,KAAK;IACjB,UAAU,EAAE,IAAI,CAAC,UAAU;CAC5B,CAAC,CAAA;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,UAAgB,EAAE,UAAmB,EAA0B,EAAE;IACvF,MAAM,OAAO,GAAgC,UAAU,CAAC,OAAO,CAAC,GAAG,CACjE,CAAC,MAAc,EAAoB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAC3F,CAAA;IACD,OAAO,SAAS,CACd,SAAS,CAAC,GAAG,CAAC,CAAC,IAAU,EAAkB,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAC7D,OAAO,EACP,UAAU,CACX,CAAC,OAAO,CAAC,CAAC,IAAc,EAA0B,EAAE;QACnD,MAAM,IAAI,GAAqB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACpD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,EAAE,CAAA;QACX,CAAC;QACD,OAAO;YACL;gBACE,IAAI;gBACJ,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,CAC7B,CAAC,SAAiB,EAAW,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,CAC/D;aACF;SACF,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { commitMessage } from './commands/commit-message.js';
|
|
2
|
+
export { format } from './commands/format.js';
|
|
3
|
+
export { init } from './commands/init.js';
|
|
4
|
+
export { sync } from './commands/sync.js';
|
|
5
|
+
export { verify, verifyOne } from './commands/verify.js';
|
|
6
|
+
export * from './context.js';
|
|
7
|
+
export * from './exec.js';
|
|
8
|
+
export * from './gates.js';
|
|
9
|
+
export * from './report.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACxD,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Programmatic surface of the ploaness CLI, so a fixture or a downstream tool can drive the gates
|
|
2
|
+
// without shelling out.
|
|
3
|
+
export { commitMessage } from './commands/commit-message.js';
|
|
4
|
+
export { format } from './commands/format.js';
|
|
5
|
+
export { init } from './commands/init.js';
|
|
6
|
+
export { sync } from './commands/sync.js';
|
|
7
|
+
export { verify, verifyOne } from './commands/verify.js';
|
|
8
|
+
export * from './context.js';
|
|
9
|
+
export * from './exec.js';
|
|
10
|
+
export * from './gates.js';
|
|
11
|
+
export * from './report.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,wBAAwB;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACxD,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA"}
|