@ploaness/governance 1.1.0 → 1.2.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/a11y-hit-target.d.ts.map +1 -1
- package/dist/a11y-hit-target.js +1 -21
- package/dist/a11y-hit-target.js.map +1 -1
- package/dist/a11y-incomplete.d.ts.map +1 -1
- package/dist/a11y-incomplete.js +1 -18
- package/dist/a11y-incomplete.js.map +1 -1
- package/dist/access-boundary.d.ts +43 -1
- package/dist/access-boundary.d.ts.map +1 -1
- package/dist/access-boundary.js +146 -5
- package/dist/access-boundary.js.map +1 -1
- package/dist/admin-view-coverage.d.ts.map +1 -1
- package/dist/admin-view-coverage.js +1 -17
- package/dist/admin-view-coverage.js.map +1 -1
- package/dist/asset-policy.d.ts.map +1 -1
- package/dist/asset-policy.js +1 -23
- package/dist/asset-policy.js.map +1 -1
- package/dist/axe-coverage.d.ts +3 -4
- package/dist/axe-coverage.d.ts.map +1 -1
- package/dist/axe-coverage.js +18 -51
- package/dist/axe-coverage.js.map +1 -1
- package/dist/blocklist-entries.d.ts +36 -0
- package/dist/blocklist-entries.d.ts.map +1 -0
- package/dist/blocklist-entries.js +338 -0
- package/dist/blocklist-entries.js.map +1 -0
- package/dist/blocklist.d.ts +91 -0
- package/dist/blocklist.d.ts.map +1 -0
- package/dist/blocklist.js +187 -0
- package/dist/blocklist.js.map +1 -0
- package/dist/container-failure.d.ts.map +1 -1
- package/dist/container-failure.js +1 -18
- package/dist/container-failure.js.map +1 -1
- package/dist/container-files.d.ts +16 -0
- package/dist/container-files.d.ts.map +1 -1
- package/dist/container-files.js +23 -8
- package/dist/container-files.js.map +1 -1
- package/dist/container-images.d.ts +43 -0
- package/dist/container-images.d.ts.map +1 -0
- package/dist/container-images.js +157 -0
- package/dist/container-images.js.map +1 -0
- package/dist/dependency-freshness.d.ts +8 -0
- package/dist/dependency-freshness.d.ts.map +1 -1
- package/dist/dependency-freshness.js +2 -18
- package/dist/dependency-freshness.js.map +1 -1
- package/dist/doc-blocks.d.ts.map +1 -1
- package/dist/doc-blocks.js +1 -13
- package/dist/doc-blocks.js.map +1 -1
- package/dist/editorconfig-policy.d.ts +7 -0
- package/dist/editorconfig-policy.d.ts.map +1 -1
- package/dist/editorconfig-policy.js +19 -12
- package/dist/editorconfig-policy.js.map +1 -1
- package/dist/environment-coherence.d.ts.map +1 -1
- package/dist/environment-coherence.js +1 -23
- package/dist/environment-coherence.js.map +1 -1
- package/dist/environment-files.d.ts.map +1 -1
- package/dist/environment-files.js +1 -19
- package/dist/environment-files.js.map +1 -1
- package/dist/file-roles.d.ts +7 -2
- package/dist/file-roles.d.ts.map +1 -1
- package/dist/file-roles.js +10 -9
- package/dist/file-roles.js.map +1 -1
- package/dist/freshness-repair.d.ts +82 -0
- package/dist/freshness-repair.d.ts.map +1 -0
- package/dist/freshness-repair.js +91 -0
- package/dist/freshness-repair.js.map +1 -0
- package/dist/generated-denial.d.ts.map +1 -1
- package/dist/generated-denial.js +1 -9
- package/dist/generated-denial.js.map +1 -1
- package/dist/generated-drift.d.ts.map +1 -1
- package/dist/generated-drift.js +1 -12
- package/dist/generated-drift.js.map +1 -1
- package/dist/harness-package.d.ts +13 -0
- package/dist/harness-package.d.ts.map +1 -0
- package/dist/harness-package.js +20 -0
- package/dist/harness-package.js.map +1 -0
- package/dist/history-policy.d.ts.map +1 -1
- package/dist/history-policy.js +1 -7
- package/dist/history-policy.js.map +1 -1
- package/dist/image-assets.d.ts.map +1 -1
- package/dist/image-assets.js +1 -10
- package/dist/image-assets.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/install-policy.d.ts +21 -0
- package/dist/install-policy.d.ts.map +1 -1
- package/dist/install-policy.js +53 -1
- package/dist/install-policy.js.map +1 -1
- package/dist/jsx-accessibility-scope.d.ts +17 -0
- package/dist/jsx-accessibility-scope.d.ts.map +1 -0
- package/dist/jsx-accessibility-scope.js +36 -0
- package/dist/jsx-accessibility-scope.js.map +1 -0
- package/dist/jsx-accessibility.d.ts +13 -0
- package/dist/jsx-accessibility.d.ts.map +1 -0
- package/dist/jsx-accessibility.js +188 -0
- package/dist/jsx-accessibility.js.map +1 -0
- package/dist/network-policy.d.ts.map +1 -1
- package/dist/network-policy.js +1 -12
- package/dist/network-policy.js.map +1 -1
- package/dist/oxlint-policy.d.ts +16 -0
- package/dist/oxlint-policy.d.ts.map +1 -0
- package/dist/oxlint-policy.js +28 -0
- package/dist/oxlint-policy.js.map +1 -0
- package/dist/oxlint-report.d.ts +29 -0
- package/dist/oxlint-report.d.ts.map +1 -0
- package/dist/oxlint-report.js +84 -0
- package/dist/oxlint-report.js.map +1 -0
- package/dist/oxlint-scope.d.ts +13 -0
- package/dist/oxlint-scope.d.ts.map +1 -0
- package/dist/oxlint-scope.js +46 -0
- package/dist/oxlint-scope.js.map +1 -0
- package/dist/oxlint-suppressions.d.ts +17 -0
- package/dist/oxlint-suppressions.d.ts.map +1 -0
- package/dist/oxlint-suppressions.js +72 -0
- package/dist/oxlint-suppressions.js.map +1 -0
- package/dist/paired-assets.d.ts.map +1 -1
- package/dist/paired-assets.js.map +1 -1
- package/dist/payload-access.d.ts +6 -0
- package/dist/payload-access.d.ts.map +1 -1
- package/dist/payload-access.js +166 -9
- package/dist/payload-access.js.map +1 -1
- package/dist/payload-configs.d.ts +0 -1
- package/dist/payload-configs.d.ts.map +1 -1
- package/dist/payload-configs.js +36 -17
- package/dist/payload-configs.js.map +1 -1
- package/dist/payload-defaults.d.ts +128 -0
- package/dist/payload-defaults.d.ts.map +1 -0
- package/dist/payload-defaults.js +295 -0
- package/dist/payload-defaults.js.map +1 -0
- package/dist/payload-policy.d.ts +13 -0
- package/dist/payload-policy.d.ts.map +1 -1
- package/dist/payload-policy.js +81 -40
- package/dist/payload-policy.js.map +1 -1
- package/dist/relationship-cleanup.d.ts.map +1 -1
- package/dist/relationship-cleanup.js +16 -16
- package/dist/relationship-cleanup.js.map +1 -1
- package/dist/release-age.d.ts.map +1 -1
- package/dist/release-age.js +1 -16
- package/dist/release-age.js.map +1 -1
- package/dist/request-limits.d.ts.map +1 -1
- package/dist/request-limits.js +1 -11
- package/dist/request-limits.js.map +1 -1
- package/dist/route-map.d.ts.map +1 -1
- package/dist/route-map.js +1 -16
- package/dist/route-map.js.map +1 -1
- package/dist/run-plan.d.ts.map +1 -1
- package/dist/run-plan.js +1 -19
- package/dist/run-plan.js.map +1 -1
- package/dist/secret-policy.d.ts.map +1 -1
- package/dist/secret-policy.js +1 -11
- package/dist/secret-policy.js.map +1 -1
- package/dist/settings-layering.d.ts +8 -30
- package/dist/settings-layering.d.ts.map +1 -1
- package/dist/settings-layering.js +19 -48
- package/dist/settings-layering.js.map +1 -1
- package/dist/settings.d.ts +9 -2
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/dist/source-text.d.ts +2 -0
- package/dist/source-text.d.ts.map +1 -1
- package/dist/source-text.js +7 -16
- package/dist/source-text.js.map +1 -1
- package/dist/toolchain-pins.d.ts.map +1 -1
- package/dist/toolchain-pins.js +2 -19
- package/dist/toolchain-pins.js.map +1 -1
- package/dist/version-policy.d.ts +7 -8
- package/dist/version-policy.d.ts.map +1 -1
- package/dist/version-policy.js +15 -26
- package/dist/version-policy.js.map +1 -1
- package/dist/vulnerability-policy.d.ts.map +1 -1
- package/dist/vulnerability-policy.js +1 -11
- package/dist/vulnerability-policy.js.map +1 -1
- package/dist/wiring-policy.d.ts.map +1 -1
- package/dist/wiring-policy.js +4 -1
- package/dist/wiring-policy.js.map +1 -1
- package/dist/wiring-violation.d.ts.map +1 -1
- package/dist/wiring-violation.js +1 -6
- package/dist/wiring-violation.js.map +1 -1
- package/dist/workspace-policy.d.ts.map +1 -1
- package/dist/workspace-policy.js +3 -9
- package/dist/workspace-policy.js.map +1 -1
- package/dist/yaml-blocks.d.ts +10 -0
- package/dist/yaml-blocks.d.ts.map +1 -1
- package/dist/yaml-blocks.js +20 -0
- package/dist/yaml-blocks.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-freshness.js","sourceRoot":"","sources":["../src/dependency-freshness.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"dependency-freshness.js","sourceRoot":"","sources":["../src/dependency-freshness.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAEvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAKvD,qGAAqG;AACrG,MAAM,CAAC,MAAM,oBAAoB,GAAW,CAAC,CAAA;AAU7C,kGAAkG;AAClG,kGAAkG;AAClG,qGAAqG;AACrG,oEAAoE;AACpE,MAAM,eAAe,GAAW,0DAA0D,CAAA;AAE1F;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAA6B,EAAE;IACrE,MAAM,KAAK,GAA2B,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC/D,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;QAC9B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;QAC9B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;QAC9B,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;KAC3B,CAAA;AACH,CAAC,CAAA;AAED,qGAAqG;AACrG,wDAAwD;AACxD,MAAM,WAAW,GAAG,CAAC,IAAmB,EAAE,KAAoB,EAAU,EAAE;IACxE,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK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,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAmB,EAAW,EAAE,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;KAChG,CAAA;AACH,CAAC,CAAA"}
|
package/dist/doc-blocks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doc-blocks.d.ts","sourceRoot":"","sources":["../src/doc-blocks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doc-blocks.d.ts","sourceRoot":"","sources":["../src/doc-blocks.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAQlD,CAAA;AAWD,8EAA8E;AAC9E,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAkDD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,SAAS,QAAQ,EAKrE,CAAA"}
|
package/dist/doc-blocks.js
CHANGED
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
// block, so the first documents nothing and the symbol it was written for carries no doc at all.
|
|
3
|
-
//
|
|
4
|
-
// This cannot be an eslint-plugin-jsdoc rule, and the reason is structural rather than a gap in that
|
|
5
|
-
// plugin. Every rule it ships visits the block ATTACHED to a syntax node, and an orphan is attached to
|
|
6
|
-
// nothing: the parser hands a declaration only the LAST block comment before it and discards the
|
|
7
|
-
// earlier ones as leading trivia. The defect is invisible to the one analyzer that exists for
|
|
8
|
-
// documenting comments, which is why it is a text rule here - the text is the only place it is still
|
|
9
|
-
// visible.
|
|
10
|
-
//
|
|
11
|
-
// It is a real class rather than a hypothetical. Four instances were found in this repository the
|
|
12
|
-
// first time anything looked, each one a doc that had been moved above the wrong symbol and left
|
|
13
|
-
// there, and each one carried the description of a symbol that was then undocumented.
|
|
1
|
+
// Report documenting blocks detached from a declaration by another documenting block.
|
|
14
2
|
// Extensions whose comment syntax this rule understands. A stylesheet shares the delimiters but has
|
|
15
3
|
// no JSDoc, so two adjacent blocks there are two comments rather than one orphan - which is why this
|
|
16
4
|
// list is narrower than CODE_EXTENSIONS.
|
package/dist/doc-blocks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doc-blocks.js","sourceRoot":"","sources":["../src/doc-blocks.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"doc-blocks.js","sourceRoot":"","sources":["../src/doc-blocks.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,oGAAoG;AACpG,qGAAqG;AACrG,yCAAyC;AACzC,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;CACP,CAAA;AAED,MAAM,QAAQ,GAAW,KAAK,CAAA;AAC9B,MAAM,WAAW,GAAW,IAAI,CAAA;AAEhC,qGAAqG;AACrG,MAAM,aAAa,GAAW,CAAC,CAAC,CAAA;AAEhC,uEAAuE;AACvE,MAAM,UAAU,GAAW,CAAC,CAAA;AAa5B,MAAM,UAAU,GAAc,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;AAEjE,iGAAiG;AACjG,kGAAkG;AAClG,MAAM,iBAAiB,GAAG,CAAC,OAAe,EAAW,EAAE,CACrD,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;AAEtD,MAAM,aAAa,GAAG,CAAC,KAAgB,EAAE,OAAe,EAAE,IAAY,EAAa,EAAE;IACnF,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,iBAAiB,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,E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,CAAC;SACd,IAAI,CAAC,CAAC,IAAY,EAAW,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC1D,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;AACtD,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAAuB,EAAE;IACzE,MAAM,KAAK,GAAsB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC1E,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,KAAe,EAAW,EAAE,CAC1D,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CACxC,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -13,6 +13,13 @@ export interface EditorconfigViolation {
|
|
|
13
13
|
readonly reason: string;
|
|
14
14
|
}
|
|
15
15
|
export declare const parseEditorconfig: (text: string) => EditorconfigRules;
|
|
16
|
+
/**
|
|
17
|
+
* Decide whether the standard's line cap binds for one file.
|
|
18
|
+
* @param filePath the repo-relative path.
|
|
19
|
+
* @param generatedArtefacts the globs the project declares generated.
|
|
20
|
+
* @returns true for an authored code file; false for prose and for generated output.
|
|
21
|
+
*/
|
|
22
|
+
export declare const isLineCapEnforced: (filePath: string, generatedArtefacts: readonly string[]) => boolean;
|
|
16
23
|
/**
|
|
17
24
|
* Check one file against the committed configuration.
|
|
18
25
|
* @param content the file's decoded content.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorconfig-policy.d.ts","sourceRoot":"","sources":["../src/editorconfig-policy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editorconfig-policy.d.ts","sourceRoot":"","sources":["../src/editorconfig-policy.ts"],"names":[],"mappings":"AAIA,wEAAwE;AACxE,eAAO,MAAM,eAAe,EAAE,MAAY,CAAA;AAE1C,gEAAgE;AAChE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IACtC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAA;IACpC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAA;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;CACzC;AAED,iEAAiE;AACjE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AA8BD,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,iBAqBhD,CAAA;AA2CD;;;;;GAKG;AAUH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,EAChB,oBAAoB,SAAS,MAAM,EAAE,KACpC,OAEqF,CAAA;AAExF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,MAAM,EACf,OAAO,iBAAiB,EACxB,sBAAsB,OAAO,KAC5B,SAAS,qBAAqB,EAgBhC,CAAA"}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
// The `.editorconfig` is a pinned managed file, so every project holds the same one - and until now
|
|
4
|
-
// nothing checked a single file against it. The formatter covers only the globs it owns, which leaves
|
|
5
|
-
// Markdown, YAML, shell scripts, and Dockerfiles free to carry a CRLF, a tab, a trailing space, or a
|
|
6
|
-
// missing final newline.
|
|
7
|
-
//
|
|
8
|
-
// The expectations are read from the `.editorconfig` itself rather than restated here, so editing the
|
|
9
|
-
// pinned file moves the gate with it and the gate cannot contradict the file it checks against. The one
|
|
10
|
-
// value that does NOT come from there is the line cap: `max_line_length` is an editor hint that tells a
|
|
11
|
-
// ruler where to sit, while the standard's 120 characters is a cap that binds as an error. A project's
|
|
12
|
-
// formatter may aim shorter, and frequently does.
|
|
1
|
+
// Judge committed formatting and the authored-code line cap independently of filesystem access.
|
|
2
|
+
import { CODE_EXTENSIONS, hasExtension, matchesGlob } from './file-roles.js';
|
|
13
3
|
/** The standard's line cap. Not configurable: a cap is never raised. */
|
|
14
4
|
export const MAX_LINE_LENGTH = 120;
|
|
15
5
|
const FIRST_LINE = 1;
|
|
@@ -80,6 +70,23 @@ const lineViolations = (content, rules, isLineLengthEnforced) => {
|
|
|
80
70
|
});
|
|
81
71
|
});
|
|
82
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* Decide whether the standard's line cap binds for one file.
|
|
75
|
+
* @param filePath the repo-relative path.
|
|
76
|
+
* @param generatedArtefacts the globs the project declares generated.
|
|
77
|
+
* @returns true for an authored code file; false for prose and for generated output.
|
|
78
|
+
*/
|
|
79
|
+
// A cap is a rule about how a person writes code, so it reaches code roles only - and only where a
|
|
80
|
+
// person wrote it. A generator emits what it emits: Payload renders each migration statement as one SQL
|
|
81
|
+
// string, and no formatter setting and no edit shortens it, because the file is frozen once applied.
|
|
82
|
+
// Holding a project to a cap it cannot satisfy would teach it to exclude the path from this gate
|
|
83
|
+
// altogether, which would cost the encoding and whitespace rules too - and those a generated file does
|
|
84
|
+
// satisfy, because the project runs its own formatter over the output.
|
|
85
|
+
// Matched as globs, not through `isGovernedCode`: `generatedArtefacts` is declared as globs and reaches
|
|
86
|
+
// ESLint's ignore list as globs, and `src/migrations/**` is not merely a different pattern under regex
|
|
87
|
+
// rules - `new RegExp` rejects it outright, so the gate would have thrown rather than reported.
|
|
88
|
+
export const isLineCapEnforced = (filePath, generatedArtefacts) => hasExtension(filePath, CODE_EXTENSIONS) &&
|
|
89
|
+
!generatedArtefacts.some((pattern) => matchesGlob(pattern, filePath));
|
|
83
90
|
/**
|
|
84
91
|
* Check one file against the committed configuration.
|
|
85
92
|
* @param content the file's decoded content.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorconfig-policy.js","sourceRoot":"","sources":["../src/editorconfig-policy.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"editorconfig-policy.js","sourceRoot":"","sources":["../src/editorconfig-policy.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE5E,wEAAwE;AACxE,MAAM,CAAC,MAAM,eAAe,GAAW,GAAG,CAAA;AAgB1C,MAAM,UAAU,GAAW,CAAC,CAAA;AAC5B,qGAAqG;AACrG,sGAAsG;AACtG,0FAA0F;AAC1F,MAAM,eAAe,GAAW,OAAO,CAAA;AACvC,MAAM,GAAG,GAAW,MAAM,CAAC,aAAa,CAAC,eAAe,CAAC,CAAA;AAEzD;;;;GAIG;AACH,qGAAqG;AACrG,sEAAsE;AACtE,MAAM,eAAe,GAAG,CAAC,IAAY,EAAqB,EAAE;IAC1D,MAAM,KAAK,GAAsB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;IAC1F,MAAM,KAAK,GAAW,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC1C,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;QACjB,OAAO,EAAE,CAAA;IACX,CAAC;IACD,MAAM,IAAI,GAAsB,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;IACtD,MAAM,GAAG,GAAW,IAAI,CAAC,SAAS,CAAC,CAAC,IAAY,EAAW,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;IACnF,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;AAC/C,CAAC,CAAA;AAED,MA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ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"environment-coherence.d.ts","sourceRoot":"","sources":["../src/environment-coherence.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,SAAS,CAAA;AAEzD,6FAA6F;AAC7F,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,wFAAwF;AACxF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,yFAAyF;AACzF,MAAM,WAAW,iBAAiB;IAChC,+FAA+F;IAC/F,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAA;IAC9C,qFAAqF;IACrF,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,0CAA0C;IAC1C,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1C,+EAA+E;IAC/E,QAAQ,CAAC,SAAS,EAAE,SAAS,YAAY,EAAE,CAAA;CAC5C;AAED;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAiC,CAAA;AAE5E;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAGxD,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAItD,CAAA;AA4CD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,KAAG,SAAS,MAAM,EAChB,CAAA;AAErD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,SAAS,MAAM,KAAG,SAAS,MAAM,EAClB,CAAA;AAE1D;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,SAAS,MAAM,KAAG,SAAS,MAAM,EACjB,CAAA;AAE7D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,KAAG,SAAS,MAAM,EAIpE,CAAA;AAEJ;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,KAAG,OAC4B,CAAA;AA+BnF;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,iBAAiB,KACxB,SAAS,oBAAoB,EAkC/B,CAAA"}
|
|
@@ -1,26 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
// and missing from another it must also reach. The `environment` gate in
|
|
3
|
-
// packages/cli/src/checks/environment.ts reads the files.
|
|
4
|
-
//
|
|
5
|
-
// A variable lands in more than one place by nature, and nothing links those places. The application
|
|
6
|
-
// reads it, `.env.example` documents it for a clone, a compose file interpolates it, and a workflow
|
|
7
|
-
// exports it into the job. Miss one and the failure is somewhere other than where the omission is: a
|
|
8
|
-
// clone boots on a default it never chose, or `docker compose config` fails on CI alone, several steps
|
|
9
|
-
// from the commit that added the name. This is the sibling of document-references.ts and
|
|
10
|
-
// config-references.ts, applied to environment variables instead of scripts, docs, or config paths.
|
|
11
|
-
//
|
|
12
|
-
// EVERY RULE IS ONE-DIRECTIONAL, which is what makes the gate false-positive-free. What is read, or
|
|
13
|
-
// interpolated, must be documented; what is documented need not be read. `.env.example` legitimately
|
|
14
|
-
// carries an optional variable no code path requires - a key for a manual script, a value only a
|
|
15
|
-
// developer regenerating an asset ever sets - and demanding the reverse containment would report those
|
|
16
|
-
// as rot.
|
|
17
|
-
//
|
|
18
|
-
// It is NOT a YAML parser and must not become one, for the reason yaml-blocks.ts states. The workflow
|
|
19
|
-
// half asks only whether a name appears in the file at all, not whether it appears in the block that
|
|
20
|
-
// would put it in the job's environment. That is deliberate: adjudicating YAML scoping would need a
|
|
21
|
-
// parser, and the mistake this gate exists to catch is forgetting the variable altogether rather than
|
|
22
|
-
// declaring it one nesting level from where it was needed. Over-accepting costs a missed finding;
|
|
23
|
-
// guessing at scope would cost a wrong one.
|
|
1
|
+
// Require environment reads, example declarations, compose interpolation, and verifying workflows to agree.
|
|
24
2
|
/**
|
|
25
3
|
* The module a Payload project reads `process.env` in, which is the only module ploaness exempts from
|
|
26
4
|
* the ban and therefore the only one this rule can read a variable name out of.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-coherence.js","sourceRoot":"","sources":["../src/environment-coherence.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"environment-coherence.js","sourceRoot":"","sources":["../src/environment-coherence.ts"],"names":[],"mappings":"AAAA,4GAA4G;AA8B5G;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAW,wBAAwB,CAAA;AAE5E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC5D,4BAA4B;IAC5B,cAAc;CACf,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAsB;IAC1D,cAAc;IACd,aAAa;IACb,eAAe;CAChB,CAAA;AAED,8FAA8F;AAC9F,wGAAwG;AACxG,wGAAwG;AACxG,iGAAiG;AACjG,yEAAyE;AACzE,MAAM,cAAc,GAAW,qEAAqE,CAAA;AAEpG,sGAAsG;AACtG,0DAA0D;AAC1D,MAAM,kBAAkB,GAAW,wDAAwD,CAAA;AAE3F,uGAAuG;AACvG,mGAAmG;AACnG,wGAAwG;AACxG,4FAA4F;AAC5F,MAAM,qBAAqB,GAAW,4BAA4B,CAAA;AAElE,wGAAwG;AACxG,wGAAwG;AACxG,MAAM,YAAY,GAAW,2CAA2C,CAAA;AACxE,MAAM,0BAA0B,GAC9B,4DAA4D,CAAA;AAE9D,gGAAgG;AAChG,wGAAwG;AACxG,6FAA6F;AAC7F,MAAM,kBAAkB,GAAsB,CAAC,iBAAiB,EAAE,eAAe,EAAE,YAAY,CAAC,CAAA;AAEhG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sB,YAAY,CAC1C,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,MAAc,EAAqB,EAAE,CACtE,oBAAoB,CAAC,MAAM,CAAC,CAC7B,CACF,CAAA;IACD,MAAM,YAAY,GAAsB,YAAY,CAClD,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,MAAc,EAAqB,EAAE,CAClE,4BAA4B,CAAC,MAAM,CAAC,CACrC,CACF,CAAA;IACD,MAAM,SAAS,GAA4B,MAAM,CAAC,SAAS,CAAC,MAAM,CAChE,CAAC,QAAsB,EAAW,EAAE,CAAC,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAC3E,CAAA;IACD,OAAO;QACL,GAAG,YAAY,CACb,IAAI,EACJ,UAAU,EACV,aAAa,EACb,4EAA4E,CAC7E;QACD,GAAG,YAAY,CACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,kEAAkE,CACnE;QACD,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,QAAsB,EAAmC,EAAE,CAC/E,mBAAmB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAC5C;KACF,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-files.d.ts","sourceRoot":"","sources":["../src/environment-files.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"environment-files.d.ts","sourceRoot":"","sources":["../src/environment-files.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAA2B,CAAA;AAE9E;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,gBAAgB,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,KAChD,SAAS,MAAM,EAC6D,CAAA;AAE/E;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,GAAI,WAAW,MAAM,KAAG,MAAM,GAAG,SASnD,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EACrD,aAAa,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EAAE,KACnE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAe/B,CAAA"}
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// A Payload config validates `process.env` at module scope, so anything that boots the project boots
|
|
4
|
-
// its configuration first. Next reads these files itself, which is why the application under test never
|
|
5
|
-
// had a problem - but a test runner does not, and the runner ploaness ships a Playwright config for
|
|
6
|
-
// boots the project in its OWN process: an end-to-end helper that seeds a user through `getPayload`
|
|
7
|
-
// evaluates `payload.config.ts` at spec-collection time, before a browser or a server is involved.
|
|
8
|
-
//
|
|
9
|
-
// The project used to load them from its own `playwright.config.ts`. The wiring gate now requires that
|
|
10
|
-
// file to be a bare re-export, which removes the only seam it had, so the harness that took the seam
|
|
11
|
-
// away owes the load. Vitest is the other half of the same shape and keeps its own answer: a project
|
|
12
|
-
// writes `vitest.setup.ts` and ploaness loads it, which is a seam the project still owns.
|
|
13
|
-
//
|
|
14
|
-
// The order is the part that carries meaning, and it is stated here rather than at the call site so
|
|
15
|
-
// that it is measured: `packages/config` is an analyzer configuration that no coverage floor reads,
|
|
16
|
-
// while everything in this package is unit-tested. Nothing loaded later may replace a value already
|
|
17
|
-
// set, so the file that must win is read first, and a variable the real environment already carries -
|
|
18
|
-
// a CI secret, a `DATABASE_URL` exported by a service container - outranks every file, because it was
|
|
19
|
-
// there before any of them was read.
|
|
1
|
+
// Declare environment file precedence shared by analysis, tests, and application startup.
|
|
20
2
|
/**
|
|
21
3
|
* The environment files a run reads, highest precedence first. `.env.local` leads because it is the
|
|
22
4
|
* personal, untracked override of `.env`; the managed `.gitignore` ignores both, which is what makes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-files.js","sourceRoot":"","sources":["../src/environment-files.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"environment-files.js","sourceRoot":"","sources":["../src/environment-files.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAE1F;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAsB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,cAAiD,EAC9B,EAAE,CACrB,qBAAqB,CAAC,MAAM,CAAC,CAAC,IAAY,EAAW,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;AAE/E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,SAAiB,EAAsB,EAAE;IAC9D,IAAI,CAAC;QACH,MAAM,IAAI,GAAW,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAA;QAC5C,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAA;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,+FAA+F;QAC/F,kFAAkF;QAClF,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,OAAqD,EACrD,WAAoE,EAClC,EAAE,CACpC,MAAM,CAAC,WAAW,CAChB,WAAW;KACR,OAAO,CACN,CACE,IAAkD,EACT,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CACnE;KACA,MAAM,CACL,CAAC,KAA4C,EAA6B,EAAE,CAC1E,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,CAC5D;IACD,kGAAkG;IAClG,mEAAmE;KAClE,UAAU,EAAE,CAChB,CAAA"}
|
package/dist/file-roles.d.ts
CHANGED
|
@@ -15,13 +15,18 @@ export declare const isBinary: (bytes: Uint8Array) => boolean;
|
|
|
15
15
|
* @returns true when the path ends with one of them.
|
|
16
16
|
*/
|
|
17
17
|
export declare const hasExtension: (filePath: string, extensions: readonly string[]) => boolean;
|
|
18
|
+
/** A role regex evaluated either at the repository root or inside its declaring member. */
|
|
19
|
+
export type RolePattern = string | {
|
|
20
|
+
readonly memberPath: string;
|
|
21
|
+
readonly pattern: string;
|
|
22
|
+
};
|
|
18
23
|
/**
|
|
19
24
|
* Decide whether a path is excluded by a declared role pattern.
|
|
20
25
|
* @param filePath the repo-relative path.
|
|
21
26
|
* @param patterns the declared exclusion patterns.
|
|
22
27
|
* @returns true when any pattern matches.
|
|
23
28
|
*/
|
|
24
|
-
export declare const matchesRole: (filePath: string, patterns: readonly
|
|
29
|
+
export declare const matchesRole: (filePath: string, patterns: readonly RolePattern[]) => boolean;
|
|
25
30
|
/**
|
|
26
31
|
* Whether a repo-relative path matches a glob pattern of the kind the coverage settings carry.
|
|
27
32
|
* @param pattern the glob, such as `src/app/**` or `src/**\/*.tsx`.
|
|
@@ -35,5 +40,5 @@ export declare const matchesGlob: (pattern: string, filePath: string) => boolean
|
|
|
35
40
|
* @param excluded the declared generated-role patterns.
|
|
36
41
|
* @returns true when the file is code and no declared role excludes it.
|
|
37
42
|
*/
|
|
38
|
-
export declare const isGovernedCode: (filePath: string, excluded: readonly
|
|
43
|
+
export declare const isGovernedCode: (filePath: string, excluded: readonly RolePattern[]) => boolean;
|
|
39
44
|
//# sourceMappingURL=file-roles.d.ts.map
|
package/dist/file-roles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-roles.d.ts","sourceRoot":"","sources":["../src/file-roles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-roles.d.ts","sourceRoot":"","sources":["../src/file-roles.ts"],"names":[],"mappings":"AAKA,sGAAsG;AACtG,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAW5C,CAAA;AAED,kGAAkG;AAClG,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAA6B,CAAA;AAE3E;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,UAAU,KAAG,OACM,CAAA;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,EAAE,YAAY,SAAS,MAAM,EAAE,KAAG,OACA,CAAA;AAE/E,2FAA2F;AAC3F,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAY5F;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,UAAU,SAAS,WAAW,EAAE,KAAG,OACI,CAAA;AA2BrF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,UAAU,MAAM,KAAG,OAG9C,CAAA;AAElB;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,UAAU,SAAS,WAAW,EAAE,KAAG,OACP,CAAA"}
|
package/dist/file-roles.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
//
|
|
2
|
-
// exclude it from a check.
|
|
3
|
-
//
|
|
4
|
-
// The typography ban used to carry its own allowlist of ten extensions, which is the wrong shape for a
|
|
5
|
-
// rule that reaches "every tracked file the repository does not exclude by role": a `.css`, a `.adoc`,
|
|
6
|
-
// a shell script, or a Dockerfile went unscanned, and every new text format arrived unscanned until
|
|
7
|
-
// someone remembered to extend the list. A role predicate is default-safe in the opposite direction -
|
|
8
|
-
// a new format is covered by construction, and exclusion is the thing that must be stated.
|
|
1
|
+
// Identify source, generated, binary, and prose roles so exclusions follow file meaning rather than tool defaults.
|
|
9
2
|
/** How much of a file is inspected before deciding it is text. Enough to reach any real header. */
|
|
10
3
|
const BINARY_PROBE_BYTES = 8192;
|
|
11
4
|
/** Extensions the Code Rules apply to, used where a rule is about code rather than about any text. */
|
|
12
5
|
export const CODE_EXTENSIONS = [
|
|
13
6
|
'.ts',
|
|
14
7
|
'.tsx',
|
|
8
|
+
'.jsx',
|
|
15
9
|
'.mts',
|
|
16
10
|
'.cts',
|
|
17
11
|
'.js',
|
|
@@ -35,13 +29,20 @@ export const isBinary = (bytes) => bytes.subarray(0, BINARY_PROBE_BYTES).include
|
|
|
35
29
|
* @returns true when the path ends with one of them.
|
|
36
30
|
*/
|
|
37
31
|
export const hasExtension = (filePath, extensions) => extensions.some((extension) => filePath.endsWith(extension));
|
|
32
|
+
const matchesPattern = (filePath, pattern) => {
|
|
33
|
+
if (typeof pattern === 'string') {
|
|
34
|
+
return new RegExp(pattern).test(filePath);
|
|
35
|
+
}
|
|
36
|
+
const prefix = `${pattern.memberPath}/`;
|
|
37
|
+
return (filePath.startsWith(prefix) && new RegExp(pattern.pattern).test(filePath.slice(prefix.length)));
|
|
38
|
+
};
|
|
38
39
|
/**
|
|
39
40
|
* Decide whether a path is excluded by a declared role pattern.
|
|
40
41
|
* @param filePath the repo-relative path.
|
|
41
42
|
* @param patterns the declared exclusion patterns.
|
|
42
43
|
* @returns true when any pattern matches.
|
|
43
44
|
*/
|
|
44
|
-
export const matchesRole = (filePath, patterns) => patterns.some((pattern) =>
|
|
45
|
+
export const matchesRole = (filePath, patterns) => patterns.some((pattern) => matchesPattern(filePath, pattern));
|
|
45
46
|
// The glob dialect the coverage settings are written in, which is not the regex dialect `matchesRole`
|
|
46
47
|
// reads. `**/` crosses directory boundaries and `*` does not, which is the whole distinction between
|
|
47
48
|
// `src/**/*.tsx` and `src/*.tsx`; collapsing the two would silently widen every pattern that uses one.
|
package/dist/file-roles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-roles.js","sourceRoot":"","sources":["../src/file-roles.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"file-roles.js","sourceRoot":"","sources":["../src/file-roles.ts"],"names":[],"mappings":"AAAA,mHAAmH;AAEnH,mGAAmG;AACnG,MAAM,kBAAkB,GAAW,IAAI,CAAA;AAEvC,sGAAsG;AACtG,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;CACR,CAAA;AAED,kGAAkG;AAClG,MAAM,CAAC,MAAM,gBAAgB,GAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AAE3E;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAiB,EAAW,EAAE,CACrD,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,UAA6B,EAAW,EAAE,CACvF,UAAU,CAAC,IAAI,CAAC,CAAC,SAAiB,EAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAA;AAK/E,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAE,OAAoB,EAAW,EAAE;IACzE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC3C,CAAC;IACD,MAAM,MAAM,GAAW,GAAG,OAAO,CAAC,UAAU,GAAG,CAAA;IAC/C,OAAO,CACL,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CA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AW,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { DeclaredCoordinate, FreshnessFinding, ManifestSource } from './dependency-freshness.js';
|
|
2
|
+
/**
|
|
3
|
+
* Who can act on a freshness finding.
|
|
4
|
+
*
|
|
5
|
+
* - `project`: declared by this repository at a version it chooses. Change the declaration.
|
|
6
|
+
* - `pin`: declared by this repository at a version ploaness decides. The wiring gate holds the
|
|
7
|
+
* declaration to the pin, so the repair is a ploaness release that carries the newer one.
|
|
8
|
+
* - `inherited`: declared in a manifest this repository inherits from ploaness. The same repair, with
|
|
9
|
+
* no line in the project to edit at all.
|
|
10
|
+
*/
|
|
11
|
+
export type FreshnessRepair = 'project' | 'pin' | 'inherited';
|
|
12
|
+
/** The order the groups print in: what the reader can act on first. */
|
|
13
|
+
export declare const REPAIR_ORDER: readonly FreshnessRepair[];
|
|
14
|
+
/** What the report needs to know about whose version a name is. */
|
|
15
|
+
export interface FreshnessOwnership {
|
|
16
|
+
/** Every name whose exact version ploaness pins for a project that declares it. */
|
|
17
|
+
readonly pinnedByHarness: ReadonlySet<string>;
|
|
18
|
+
/**
|
|
19
|
+
* True when the repository under judgement is ploaness itself. Its pins are a file it tracks, so a
|
|
20
|
+
* pinned coordinate there is the project's to change like any other.
|
|
21
|
+
*/
|
|
22
|
+
readonly isHarnessItself: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** One group of the report: the findings that share a repair, under the line that states it. */
|
|
25
|
+
export interface FreshnessSection {
|
|
26
|
+
readonly repair: FreshnessRepair;
|
|
27
|
+
/** The action for every finding beneath it, stated once. */
|
|
28
|
+
readonly heading: string;
|
|
29
|
+
readonly findings: readonly FreshnessFinding[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Whether this repository is ploaness: it tracks the manifest of the package called `ploaness`.
|
|
33
|
+
*
|
|
34
|
+
* Decided from what the tree contains rather than from a flag, for the reason a member's kind is
|
|
35
|
+
* derived from what it declares: nothing can describe itself into a weaker reading. Read from the
|
|
36
|
+
* project's own manifests only, because in a consumer the same name arrives as an INHERITED manifest,
|
|
37
|
+
* and that is exactly the case this must answer `false` for.
|
|
38
|
+
* @param manifests every manifest the gate read, the project's own and the inherited ones.
|
|
39
|
+
* @returns true when a manifest the project tracks is ploaness's own.
|
|
40
|
+
*/
|
|
41
|
+
export declare const isHarnessRepository: (manifests: readonly ManifestSource[]) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether ploaness decides the version a project declares a name at.
|
|
44
|
+
*
|
|
45
|
+
* Three rules, each one the wiring gate already enforces and each derived from it rather than restated:
|
|
46
|
+
* a pinned name must match the pin, a `@payloadcms/*` package must match the pinned `payload`, and a
|
|
47
|
+
* `@ploaness/*` package must match the declared `ploaness`. `ploaness` itself is the one exception,
|
|
48
|
+
* and it proves the third rule: the release is the single version a project is entitled to choose,
|
|
49
|
+
* and upgrading it is the repair every line in the two harness groups names.
|
|
50
|
+
* @param name the declared name.
|
|
51
|
+
* @param pinnedByHarness every name ploaness pins.
|
|
52
|
+
* @returns true when the project may not change the version on its own.
|
|
53
|
+
*/
|
|
54
|
+
export declare const isVersionDecidedByHarness: (name: string, pinnedByHarness: ReadonlySet<string>) => boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whose repair one coordinate is.
|
|
57
|
+
* @param coordinate the declared coordinate, with the manifest that declares it.
|
|
58
|
+
* @param ownership whose version each name is.
|
|
59
|
+
* @returns the group the finding belongs in.
|
|
60
|
+
*/
|
|
61
|
+
export declare const repairOf: (coordinate: DeclaredCoordinate, ownership: FreshnessOwnership) => FreshnessRepair;
|
|
62
|
+
/**
|
|
63
|
+
* Whether a finding is the harness release itself, in the project's own manifest.
|
|
64
|
+
*
|
|
65
|
+
* It is the one line in the project group whose repair is every harness line's repair, so the report
|
|
66
|
+
* says so on it.
|
|
67
|
+
* @param finding the finding to classify.
|
|
68
|
+
* @returns true for `ploaness` declared by the project.
|
|
69
|
+
*/
|
|
70
|
+
export declare const isHarnessRelease: (finding: DeclaredCoordinate) => boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Sort the report's findings into the three repair groups, in the order they print.
|
|
73
|
+
*
|
|
74
|
+
* Every group is returned, empty or not, so the caller decides what an empty one prints as; the
|
|
75
|
+
* order within a group is the order the findings arrived in, which is manifest order, so the same tree
|
|
76
|
+
* yields the same report.
|
|
77
|
+
* @param findings every finding the report will print.
|
|
78
|
+
* @param ownership whose version each name is.
|
|
79
|
+
* @returns the three groups, each under its heading.
|
|
80
|
+
*/
|
|
81
|
+
export declare const sectionFreshnessReport: (findings: readonly FreshnessFinding[], ownership: FreshnessOwnership) => readonly FreshnessSection[];
|
|
82
|
+
//# sourceMappingURL=freshness-repair.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freshness-repair.d.ts","sourceRoot":"","sources":["../src/freshness-repair.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACf,MAAM,2BAA2B,CAAA;AAKlC;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,KAAK,GAAG,WAAW,CAAA;AAE7D,uEAAuE;AACvE,eAAO,MAAM,YAAY,EAAE,SAAS,eAAe,EAAoC,CAAA;AAEvF,mEAAmE;AACnE,MAAM,WAAW,kBAAkB;IACjC,mFAAmF;IACnF,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC7C;;;OAGG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;CAClC;AAED,gGAAgG;AAChG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAChC,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAA;CAC/C;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,GAAI,WAAW,SAAS,cAAc,EAAE,KAAG,OAIxE,CAAA;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,GACpC,MAAM,MAAM,EACZ,iBAAiB,WAAW,CAAC,MAAM,CAAC,KACnC,OAEoF,CAAA;AAEvF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GACnB,YAAY,kBAAkB,EAC9B,WAAW,kBAAkB,KAC5B,eAQF,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,kBAAkB,KAAG,OACL,CAAA;AAwB1D;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,SAAS,gBAAgB,EAAE,EACrC,WAAW,kBAAkB,KAC5B,SAAS,gBAAgB,EAa3B,CAAA"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Assign each update to the project or harness that owns its version, using the wiring policy as authority.
|
|
2
|
+
import { HARNESS_PACKAGE, isHarnessPackage } from './harness-package.js';
|
|
3
|
+
import { asRecord, asText } from './json-shapes.js';
|
|
4
|
+
import { isPayloadFamilyPackage } from './version-policy.js';
|
|
5
|
+
/** The order the groups print in: what the reader can act on first. */
|
|
6
|
+
export const REPAIR_ORDER = ['project', 'pin', 'inherited'];
|
|
7
|
+
/**
|
|
8
|
+
* Whether this repository is ploaness: it tracks the manifest of the package called `ploaness`.
|
|
9
|
+
*
|
|
10
|
+
* Decided from what the tree contains rather than from a flag, for the reason a member's kind is
|
|
11
|
+
* derived from what it declares: nothing can describe itself into a weaker reading. Read from the
|
|
12
|
+
* project's own manifests only, because in a consumer the same name arrives as an INHERITED manifest,
|
|
13
|
+
* and that is exactly the case this must answer `false` for.
|
|
14
|
+
* @param manifests every manifest the gate read, the project's own and the inherited ones.
|
|
15
|
+
* @returns true when a manifest the project tracks is ploaness's own.
|
|
16
|
+
*/
|
|
17
|
+
export const isHarnessRepository = (manifests) => manifests.some((manifest) => !manifest.isInherited && asText(asRecord(manifest.packageJson)['name']) === HARNESS_PACKAGE);
|
|
18
|
+
/**
|
|
19
|
+
* Whether ploaness decides the version a project declares a name at.
|
|
20
|
+
*
|
|
21
|
+
* Three rules, each one the wiring gate already enforces and each derived from it rather than restated:
|
|
22
|
+
* a pinned name must match the pin, a `@payloadcms/*` package must match the pinned `payload`, and a
|
|
23
|
+
* `@ploaness/*` package must match the declared `ploaness`. `ploaness` itself is the one exception,
|
|
24
|
+
* and it proves the third rule: the release is the single version a project is entitled to choose,
|
|
25
|
+
* and upgrading it is the repair every line in the two harness groups names.
|
|
26
|
+
* @param name the declared name.
|
|
27
|
+
* @param pinnedByHarness every name ploaness pins.
|
|
28
|
+
* @returns true when the project may not change the version on its own.
|
|
29
|
+
*/
|
|
30
|
+
export const isVersionDecidedByHarness = (name, pinnedByHarness) => name !== HARNESS_PACKAGE &&
|
|
31
|
+
(pinnedByHarness.has(name) || isPayloadFamilyPackage(name) || isHarnessPackage(name));
|
|
32
|
+
/**
|
|
33
|
+
* Whose repair one coordinate is.
|
|
34
|
+
* @param coordinate the declared coordinate, with the manifest that declares it.
|
|
35
|
+
* @param ownership whose version each name is.
|
|
36
|
+
* @returns the group the finding belongs in.
|
|
37
|
+
*/
|
|
38
|
+
export const repairOf = (coordinate, ownership) => {
|
|
39
|
+
if (coordinate.isInherited) {
|
|
40
|
+
return 'inherited';
|
|
41
|
+
}
|
|
42
|
+
return !ownership.isHarnessItself &&
|
|
43
|
+
isVersionDecidedByHarness(coordinate.name, ownership.pinnedByHarness)
|
|
44
|
+
? 'pin'
|
|
45
|
+
: 'project';
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Whether a finding is the harness release itself, in the project's own manifest.
|
|
49
|
+
*
|
|
50
|
+
* It is the one line in the project group whose repair is every harness line's repair, so the report
|
|
51
|
+
* says so on it.
|
|
52
|
+
* @param finding the finding to classify.
|
|
53
|
+
* @returns true for `ploaness` declared by the project.
|
|
54
|
+
*/
|
|
55
|
+
export const isHarnessRelease = (finding) => !finding.isInherited && finding.name === HARNESS_PACKAGE;
|
|
56
|
+
// The two harness groups name one repair, and which one depends on whether there is a release to take.
|
|
57
|
+
// A heading that said "upgrade ploaness" over a project already on the latest release would send the
|
|
58
|
+
// reader to an upgrade that does not exist; the honest statement then is that the wait is on ploaness.
|
|
59
|
+
const harnessRepair = (hasNewerHarness) => hasNewerHarness
|
|
60
|
+
? `upgrading ${HARNESS_PACKAGE} is the repair`
|
|
61
|
+
: `no newer ${HARNESS_PACKAGE} release is published yet, so the repair is to report a version ` +
|
|
62
|
+
'that matters';
|
|
63
|
+
const headingOf = (repair, hasNewerHarness) => {
|
|
64
|
+
const headings = {
|
|
65
|
+
project: 'yours to change: declared by this project at a version it chooses',
|
|
66
|
+
pin: `pinned by ${HARNESS_PACKAGE}: declared by this project at a version ${HARNESS_PACKAGE} ` +
|
|
67
|
+
`decides, and the wiring gate holds it there; ${harnessRepair(hasNewerHarness)}`,
|
|
68
|
+
inherited: `declared by ${HARNESS_PACKAGE}: in manifests this project inherits, so there is nothing ` +
|
|
69
|
+
`here to edit; ${harnessRepair(hasNewerHarness)}`,
|
|
70
|
+
};
|
|
71
|
+
return headings[repair];
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Sort the report's findings into the three repair groups, in the order they print.
|
|
75
|
+
*
|
|
76
|
+
* Every group is returned, empty or not, so the caller decides what an empty one prints as; the
|
|
77
|
+
* order within a group is the order the findings arrived in, which is manifest order, so the same tree
|
|
78
|
+
* yields the same report.
|
|
79
|
+
* @param findings every finding the report will print.
|
|
80
|
+
* @param ownership whose version each name is.
|
|
81
|
+
* @returns the three groups, each under its heading.
|
|
82
|
+
*/
|
|
83
|
+
export const sectionFreshnessReport = (findings, ownership) => {
|
|
84
|
+
const hasNewerHarness = findings.some((finding) => isHarnessRelease(finding));
|
|
85
|
+
return REPAIR_ORDER.map((repair) => ({
|
|
86
|
+
repair,
|
|
87
|
+
heading: headingOf(repair, hasNewerHarness),
|
|
88
|
+
findings: findings.filter((finding) => repairOf(finding, ownership) === repair),
|
|
89
|
+
}));
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=freshness-repair.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freshness-repair.js","sourceRoot":"","sources":["../src/freshness-repair.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAO5G,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAa5D,uEAAuE;AACvE,MAAM,CAAC,MAAM,YAAY,GAA+B,CAAC,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,CAAA;AAqBvF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAAoC,EAAW,EAAE,CACnF,SAAS,CAAC,IAAI,CACZ,CAAC,QAAwB,EAAW,EAAE,CACpC,CAAC,QAAQ,CAAC,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,eAAe,CAC9F,CAAA;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,IAAY,EACZ,eAAoC,EAC3B,EAAE,CACX,IAAI,KAAK,eAAe;IACxB,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAA;AAEvF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,UAA8B,EAC9B,SAA6B,EACZ,EAAE;IACnB,IAAI,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,OAAO,WAAW,CAAA;IACpB,CAAC;IACD,OAAO,CAA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,CAAC;QAC3C,QAAQ,EAAE,QAAQ,CAAC,MAAM,CACvB,CAAC,OAAyB,EAAW,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,KAAK,MAAM,CAChF;KACF,CAAC,CACH,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-denial.d.ts","sourceRoot":"","sources":["../src/generated-denial.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generated-denial.d.ts","sourceRoot":"","sources":["../src/generated-denial.ts"],"names":[],"mappings":"AAGA,sGAAsG;AACtG,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAIhD,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,GAAI,WAAW,SAAS,MAAM,EAAE,KAAG,SAAS,MAAM,EAI5E,CAAA;AASJ;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GACzB,UAAU,OAAO,EACjB,WAAW,SAAS,MAAM,EAAE,KAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CASxB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAC/B,UAAU,OAAO,EACjB,eAAe,OAAO,EACtB,WAAW,SAAS,MAAM,EAAE,KAC3B,SAAS,MAAM,EAgBjB,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,GACzB,aAAa,SAAS,MAAM,EAAE,EAC9B,WAAW,SAAS,MAAM,EAAE,KAC3B,SAAS,MAAM,EAKf,CAAA"}
|
package/dist/generated-denial.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// A generated file changes only as the output of its generator, and the regeneration check already
|
|
4
|
-
// fails on a hand edit. That check reports the damage after the fact; the denial stops the edit from
|
|
5
|
-
// being made, which is the difference between a build that fails and work that was never wasted.
|
|
6
|
-
//
|
|
7
|
-
// The standard scopes this to "where the runtime used by AI agents supports the denial", so a rule here
|
|
8
|
-
// binds one runtime and cannot bind them all. That is conformance rather than a shortfall, and the gate
|
|
9
|
-
// says so rather than implying a guarantee it does not have.
|
|
1
|
+
// Derive agent-runtime write denials from the generated-file roles the harness already governs.
|
|
10
2
|
import { asRecord, isArray, readKey } from './json-shapes.js';
|
|
11
3
|
/** The artefacts Payload derives from the configuration. Declared once and consumed by every rule. */
|
|
12
4
|
export const GENERATED_ARTEFACTS = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-denial.js","sourceRoot":"","sources":["../src/generated-denial.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"generated-denial.js","sourceRoot":"","sources":["../src/generated-denial.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE7D,sGAAsG;AACtG,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,sBAAsB;IACtB,sCAAsC;IACtC,iCAAiC;CAClC,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAA4B,EAAqB,EAAE,CACnF,SAAS,CAAC,OAAO,CAAC,CAAC,QAAgB,EAAqB,EAAE,CAAC;IACzD,QAAQ,QAAQ,GAAG;IACnB,SAAS,QAAQ,GAAG;CACrB,CAAC,CAAA;AAEJ,MAAM,SAAS,GAAG,CAAC,QAAiB,EAAE,OAAe,EAAE,GAAW,EAAqB,EAAE;IACvF,MAAM,KAAK,GAAY,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAA;IAC/D,OAAO,OAAO,CAAC,KAAK,CAAC;QACnB,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAc,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;QAC9E,CAAC,CAAC,EAAE,CAAA;A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CAAA;IACnF,MAAM,WAAW,GAAsB,OAAO;SAC3C,MAAM,CAAC,CAAC,IAAY,EAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SAC1D,GAAG,CACF,CAAC,IAAY,EAAU,EAAE,CACvB,4BAA4B,IAAI,0DAA0D,CAC7F,CAAA;IACH,OAAO,CAAC,GAAG,OAAO,EAAE,GAAG,WAAW,CAAC,CAAA;AACrC,CAAC,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAA8B,EAC9B,SAA4B,EACT,EAAE,CACrB,WAAW,CAAC,OAAO,CAAC,CAAC,UAAkB,EAAqB,EAAE,CAC5D,SAAS,CAAC,GAAG,CAAC,CAAC,QAAgB,EAAU,EAAE,CACzC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,QAAQ,EAAE,CAC5D,CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-drift.d.ts","sourceRoot":"","sources":["../src/generated-drift.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generated-drift.d.ts","sourceRoot":"","sources":["../src/generated-drift.ts"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,sFAAsF;IACtF,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,qFAAqF;IACrF,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,qGAAqG;IACrG,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CACnC;AAmBD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAW,SAAS,mBAAmB,EAAE,KAAG,SAAS,MAAM,EACF,CAAA"}
|
package/dist/generated-drift.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// The gate regenerates, then asks whether anything changed. What "changed" means is the whole of the
|
|
4
|
-
// decision, and asking git answers a DIFFERENT question: whether the file differs from the INDEX. The
|
|
5
|
-
// two part company the moment a developer regenerates as part of the change they are making. The
|
|
6
|
-
// artefact then matches its configuration exactly - which is the only thing this gate claims to check -
|
|
7
|
-
// and the run fails anyway, telling them to commit a file they have already brought up to date. The
|
|
8
|
-
// only way out was to stage the artefact before every run, a step nothing announces and no other gate
|
|
9
|
-
// needs.
|
|
10
|
-
//
|
|
11
|
-
// Comparing the bytes before regeneration with the bytes after asks the question the gate is named for,
|
|
12
|
-
// and it holds whatever git has or has not been told.
|
|
1
|
+
// Compare generated bytes before and after regeneration; verification reports drift rather than accepting a repair.
|
|
13
2
|
const driftOf = (artefact) => {
|
|
14
3
|
// An artefact the configuration does not produce is not this gate's business. A project with no admin
|
|
15
4
|
// panel has no import map, and demanding one would be a rule about the shape of the project.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-drift.js","sourceRoot":"","sources":["../src/generated-drift.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"generated-drift.js","sourceRoot":"","sources":["../src/generated-drift.ts"],"names":[],"mappings":"AAAA,oHAAoH;AAcpH,MAAM,OAAO,GAAG,CAAC,QAA6B,EAAqB,EAAE;IACnE,sGAAsG;IACtG,6FAA6F;IAC7F,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QACjC,OAAO,EAAE,CAAA;IACX,CAAC;IACD,sGAAsG;IACtG,mGAAmG;IACnG,uCAAuC;IACvC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;QACxB,OAAO;YACL,GAAG,QAAQ,CAAC,MAAM,2EAA2E;SAC9F,CAAA;IACH,CAAC;IACD,OAAO,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,2BAA2B,CAAC,CAAA;AAClG,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAyC,EAAqB,EAAE,CACjG,SAAS,CAAC,OAAO,CAAC,CAAC,QAA6B,EAAqB,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAA"}
|