@goodbones/oxlint 0.1.0-beta.2 → 0.1.0-beta.21

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.
Files changed (52) hide show
  1. package/build/dts/campaigns/host.d.ts +19 -0
  2. package/build/dts/campaigns/host.d.ts.map +1 -0
  3. package/build/dts/campaigns/live.d.ts +3 -0
  4. package/build/dts/campaigns/live.d.ts.map +1 -0
  5. package/build/dts/campaigns/none.d.ts +6 -0
  6. package/build/dts/campaigns/none.d.ts.map +1 -0
  7. package/build/dts/campaigns/rule.d.ts +6 -0
  8. package/build/dts/campaigns/rule.d.ts.map +1 -0
  9. package/build/dts/config-loader.d.ts +3 -3
  10. package/build/dts/config-loader.d.ts.map +1 -1
  11. package/build/dts/exports-rule.d.ts.map +1 -1
  12. package/build/dts/imports-rule.d.ts.map +1 -1
  13. package/build/dts/members-rule.d.ts.map +1 -1
  14. package/build/dts/oxlint-api.d.ts +4 -33
  15. package/build/dts/oxlint-api.d.ts.map +1 -1
  16. package/build/dts/plugin.d.ts +1 -0
  17. package/build/dts/plugin.d.ts.map +1 -1
  18. package/build/dts/surface-rule.d.ts.map +1 -1
  19. package/build/esm/campaigns/host.js +2 -0
  20. package/build/esm/campaigns/host.js.map +1 -0
  21. package/build/esm/campaigns/live.js +81 -0
  22. package/build/esm/campaigns/live.js.map +1 -0
  23. package/build/esm/campaigns/none.js +46 -0
  24. package/build/esm/campaigns/none.js.map +1 -0
  25. package/build/esm/campaigns/rule.js +163 -0
  26. package/build/esm/campaigns/rule.js.map +1 -0
  27. package/build/esm/config-loader.js +37 -5
  28. package/build/esm/config-loader.js.map +1 -1
  29. package/build/esm/exports-rule.js +15 -71
  30. package/build/esm/exports-rule.js.map +1 -1
  31. package/build/esm/imports-rule.js +14 -26
  32. package/build/esm/imports-rule.js.map +1 -1
  33. package/build/esm/members-rule.js +10 -112
  34. package/build/esm/members-rule.js.map +1 -1
  35. package/build/esm/oxlint-api.js +22 -20
  36. package/build/esm/oxlint-api.js.map +1 -1
  37. package/build/esm/plugin.js +4 -0
  38. package/build/esm/plugin.js.map +1 -1
  39. package/build/esm/surface-rule.js +11 -127
  40. package/build/esm/surface-rule.js.map +1 -1
  41. package/package.json +19 -7
  42. package/src/campaigns/host.ts +45 -0
  43. package/src/campaigns/live.ts +106 -0
  44. package/src/campaigns/none.ts +54 -0
  45. package/src/campaigns/rule.ts +243 -0
  46. package/src/config-loader.ts +42 -5
  47. package/src/exports-rule.ts +19 -106
  48. package/src/imports-rule.ts +16 -35
  49. package/src/members-rule.ts +11 -165
  50. package/src/oxlint-api.ts +31 -47
  51. package/src/plugin.ts +5 -0
  52. package/src/surface-rule.ts +15 -189
@@ -0,0 +1,19 @@
1
+ import type { LoadedPolicy as CorePolicy, PolicyExtension, UninstalledExtension } from "@goodbones/core";
2
+ import type { OxlintRule } from "../oxlint-api.js";
3
+ export type CampaignsHost = {
4
+ readonly rule: (policy: CorePolicy) => OxlintRule;
5
+ };
6
+ export type LoadedPolicy = CorePolicy & {
7
+ readonly campaigns: CampaignsHost;
8
+ };
9
+ export type Composition = {
10
+ readonly manifest: unknown;
11
+ readonly extensions: ReadonlyArray<PolicyExtension>;
12
+ readonly uninstalled: ReadonlyArray<UninstalledExtension>;
13
+ };
14
+ export type CampaignsFamily = {
15
+ readonly host: CampaignsHost;
16
+ readonly compose: (repoRoot: string, configPath: string, manifest: unknown) => Promise<Composition>;
17
+ readonly prepare: (policy: CorePolicy) => Promise<void>;
18
+ };
19
+ //# sourceMappingURL=host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../src/campaigns/host.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,YAAY,IAAI,UAAU,EAC1B,eAAe,EACf,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG;IAE1B,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,CAAC;CACnD,CAAC;AAIF,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAA;CAAE,CAAC;AAM9E,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IACpD,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,CAChB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,OAAO,KACd,OAAO,CAAC,WAAW,CAAC,CAAC;IAE1B,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CampaignsFamily } from "./host.js";
2
+ export declare const liveCampaigns: CampaignsFamily;
3
+ //# sourceMappingURL=live.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../../src/campaigns/live.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AA2CjD,eAAO,MAAM,aAAa,EAAE,eA2C3B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { OxlintRule } from "../oxlint-api.js";
2
+ import type { CampaignsFamily } from "./host.js";
3
+ export declare const CAMPAIGNS_PACKAGE = "@goodbones/campaigns";
4
+ export declare const notInstalledRule: () => OxlintRule;
5
+ export declare const campaignsNotInstalled: CampaignsFamily;
6
+ //# sourceMappingURL=none.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../../src/campaigns/none.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAKjD,eAAO,MAAM,iBAAiB,yBAAyB,CAAC;AAWxD,eAAO,MAAM,gBAAgB,QAAO,UA0BnC,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,eAKnC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type SectorIndex } from "@goodbones/campaigns";
2
+ import { type LoadedPolicy } from "@goodbones/core";
3
+ import { type OxlintRule } from "../oxlint-api.js";
4
+ export type SectorIndexes = ReadonlyMap<string, SectorIndex>;
5
+ export declare const makeCampaignsRule: (policy: LoadedPolicy, indexes?: SectorIndexes) => OxlintRule;
6
+ //# sourceMappingURL=rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../../src/campaigns/rule.ts"],"names":[],"mappings":"AAEA,OAAO,EAmBL,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAiB,KAAK,YAAY,EAAqB,MAAM,iBAAiB,CAAC;AAGtF,OAAO,EAEL,KAAK,UAAU,EAIhB,MAAM,kBAAkB,CAAC;AAsB1B,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AA2D7D,eAAO,MAAM,iBAAiB,WACpB,YAAY,YACX,aAAa,KACrB,UA6HF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type LoadedPolicy } from "@goodbones/core";
2
- export type { LoadedPolicy } from "@goodbones/core";
3
- export declare const loadPolicyFromFile: (repoRoot: string, configFilename?: string) => Promise<LoadedPolicy>;
1
+ import type { CampaignsFamily, LoadedPolicy } from "./campaigns/host.js";
2
+ export type { LoadedPolicy } from "./campaigns/host.js";
3
+ export declare const loadPolicyFromFile: (repoRoot: string, configFilename?: string, given?: CampaignsFamily) => Promise<LoadedPolicy>;
4
4
  //# sourceMappingURL=config-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/config-loader.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,EAIlB,MAAM,iBAAiB,CAAC;AAIzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAOpD,eAAO,MAAM,kBAAkB,aACnB,MAAM,mBACC,MAAM,KACtB,OAAO,CAAC,YAAY,CAkBtB,CAAC"}
1
+ {"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/config-loader.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGzE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA6BxD,eAAO,MAAM,kBAAkB,aACnB,MAAM,mBACC,MAAM,UACf,eAAe,KACtB,OAAO,CAAC,YAAY,CA6BtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"exports-rule.d.ts","sourceRoot":"","sources":["../../src/exports-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAOL,KAAK,UAAU,EAKhB,MAAM,iBAAiB,CAAC;AA4EzB,eAAO,MAAM,eAAe,WAAY,YAAY,KAAG,UAgGrD,CAAC"}
1
+ {"version":3,"file":"exports-rule.d.ts","sourceRoot":"","sources":["../../src/exports-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAIL,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AAYzB,eAAO,MAAM,eAAe,WAAY,YAAY,KAAG,UA6ErD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"imports-rule.d.ts","sourceRoot":"","sources":["../../src/imports-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EAGlB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAML,KAAK,UAAU,EAOhB,MAAM,iBAAiB,CAAC;AAOzB,eAAO,MAAM,eAAe,WAAY,YAAY,KAAG,UAkErD,CAAC"}
1
+ {"version":3,"file":"imports-rule.d.ts","sourceRoot":"","sources":["../../src/imports-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EAGlB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAGL,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AAOzB,eAAO,MAAM,eAAe,WAAY,YAAY,KAAG,UAoDrD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"members-rule.d.ts","sourceRoot":"","sources":["../../src/members-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AAsGzB,eAAO,MAAM,eAAe,WAAY,YAAY,KAAG,UAwFrD,CAAC"}
1
+ {"version":3,"file":"members-rule.d.ts","sourceRoot":"","sources":["../../src/members-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAGL,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,eAAe,WAAY,YAAY,KAAG,UAiCrD,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type ReadFacts, type SyntaxNode } from "@goodbones/typescript";
1
2
  import type { RuleTester } from "oxlint/plugins-dev";
2
3
  export type OxlintRule = Parameters<RuleTester["run"]>[1];
3
4
  export type RuleContext = Parameters<Extract<OxlintRule, {
@@ -8,39 +9,9 @@ export type ReportableNode = Extract<Diagnostic, {
8
9
  node: unknown;
9
10
  }>["node"];
10
11
  export type Fixer = Parameters<NonNullable<Diagnostic["fix"]>>[0];
11
- export type SourceNode = ReportableNode & {
12
- readonly source?: {
13
- readonly value?: unknown;
14
- } | null;
15
- };
12
+ export type Program = RuleContext["sourceCode"]["ast"];
16
13
  export declare const toRepoRelative: (repoRoot: string, filename: string) => string;
17
- export declare const specifierOf: (node: SourceNode) => string | null;
18
- export type CallNode = ReportableNode & {
19
- readonly callee?: {
20
- readonly type: string;
21
- readonly name?: unknown;
22
- } | null;
23
- readonly arguments?: ReadonlyArray<{
24
- readonly type: string;
25
- readonly value?: unknown;
26
- }> | null;
27
- };
28
- export type ImportExpressionNode = ReportableNode & {
29
- readonly source?: {
30
- readonly type?: string;
31
- readonly value?: unknown;
32
- } | null;
33
- };
34
- export type ImportEqualsNode = ReportableNode & {
35
- readonly moduleReference?: {
36
- readonly type: string;
37
- readonly expression?: {
38
- readonly value?: unknown;
39
- } | null;
40
- } | null;
41
- };
42
- export declare const requireSpecifierOf: (node: CallNode) => string | null;
43
- export declare const importExpressionSpecifierOf: (node: ImportExpressionNode) => string | null;
44
- export declare const importEqualsSpecifierOf: (node: ImportEqualsNode) => string | null;
14
+ export declare const at: (node: SyntaxNode) => ReportableNode;
15
+ export declare const factsOfProgram: (file: string, program: Program) => ReadFacts;
45
16
  export {};
46
17
  //# sourceMappingURL=oxlint-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oxlint-api.d.ts","sourceRoot":"","sources":["../../src/oxlint-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,UAAU,EAAE;IAAE,UAAU,EAAE,OAAO,CAAA;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MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAIlE,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC;AAEvD,eAAO,MAAM,cAAc,aAAc,MAAM,YAAY,MAAM,KAAG,MACP,CAAC;AAI9D,eAAO,MAAM,EAAE,SAAU,UAAU,KAAG,cAEpC,CAAC;AAOH,eAAO,MAAM,cAAc,SAAU,MAAM,WAAW,OAAO,KAAG,SAW/D,CAAC"}
@@ -5,6 +5,7 @@ export declare const rules: {
5
5
  readonly members: OxlintRule;
6
6
  readonly structure: OxlintRule;
7
7
  readonly surface: OxlintRule;
8
+ readonly campaigns: OxlintRule;
8
9
  };
9
10
  declare const plugin: {
10
11
  readonly meta: {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAoBlD,eAAO,MAAM,KAAK,EAAE;IAClB,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;CAO9B,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,KAAK,CAAA;CAGrF,CAAC;eAEa,MAAM"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAoBlD,eAAO,MAAM,KAAK,EAAE;IAClB,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;CAWhC,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,KAAK,CAAA;CAGrF,CAAC;eAEa,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"surface-rule.d.ts","sourceRoot":"","sources":["../../src/surface-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AA+KzB,eAAO,MAAM,eAAe,WAAY,YAAY,KAAG,UA8CrD,CAAC"}
1
+ {"version":3,"file":"surface-rule.d.ts","sourceRoot":"","sources":["../../src/surface-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAGL,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,eAAe,WAAY,YAAY,KAAG,UA4CrD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.js","sourceRoot":"","sources":["../../../src/campaigns/host.ts"],"names":[],"mappings":""}
@@ -0,0 +1,81 @@
1
+ import * as path from "node:path";
2
+ import { campaignsExtension, campaignsOf, discoverSectors, loadCampaignFunctions, makeReportSourceLive, reportSpecsOf, } from "@goodbones/campaigns";
3
+ import { globToRegExp, listSourceFiles, listWorkspaceProjects, ReportUnavailable, } from "@goodbones/core";
4
+ import { makeCampaignsRule } from "./rule.js";
5
+ // The campaigns family as the plugin runs it, over `@goodbones/campaigns`.
6
+ // The one module that loads the package: the composition root imports it
7
+ // through `importOptional`, so its absence is `none`, not a failure to load.
8
+ // A `marker` or `nx` perimeter needs the other files to say which sector a
9
+ // file is in — the markers, or the workspace's projects — so the plugin
10
+ // reads them once at load, from a walk of the repository that reads no
11
+ // source text but the markers'. The other perimeters answer from the path
12
+ // or the file itself, and need nothing here.
13
+ const discoverSectorIndexes = (policy) => {
14
+ const indexes = new Map();
15
+ const needing = campaignsOf(policy).campaignRules.filter((rule) => rule.perimeter?.kind === "marker" || rule.perimeter?.kind === "nx");
16
+ if (needing.length === 0)
17
+ return indexes;
18
+ const widened = [...new Set(needing.flatMap((rule) => rule.extensions))];
19
+ const files = listSourceFiles(policy.repoRoot, ["."], policy.languages, widened);
20
+ const known = new Set(policy.languages.flatMap((one) => one.extensions));
21
+ const projects = needing.some((rule) => rule.perimeter?.kind === "nx")
22
+ ? listWorkspaceProjects(policy.repoRoot, ["."])
23
+ : [];
24
+ for (const rule of needing) {
25
+ const scoped = files.filter((file) => rule.scope.some((pattern) => pattern.test(file)) &&
26
+ (known.has(path.extname(file)) || rule.extensions.includes(path.extname(file))));
27
+ indexes.set(rule.id, discoverSectors(rule, {
28
+ files: scoped,
29
+ readText: (file) => policy.fileSystem.readText(file),
30
+ globToRegExp,
31
+ projects,
32
+ }));
33
+ }
34
+ return indexes;
35
+ };
36
+ export const liveCampaigns = {
37
+ // The sectors a `marker` or `nx` perimeter births are read once here,
38
+ // from the markers and the workspace, before any file is linted.
39
+ host: { rule: (policy) => makeCampaignsRule(policy, discoverSectorIndexes(policy)) },
40
+ // The `fn` terms are imported here, before the policy loads, as the CLI
41
+ // does. A `report` command runs once per process — once per editor session
42
+ // for oxlint's language server, which then sees that report until it
43
+ // restarts. A report the build writes to a file is the predictable form.
44
+ compose: async (repoRoot, configPath, manifest) => {
45
+ const loaded = await loadCampaignFunctions(configPath, manifest);
46
+ return {
47
+ manifest: loaded.manifest,
48
+ extensions: [
49
+ campaignsExtension({
50
+ functions: loaded.functions,
51
+ reports: makeReportSourceLive(repoRoot),
52
+ }),
53
+ ],
54
+ uninstalled: [],
55
+ };
56
+ },
57
+ // Every `report` a campaign names is read now, while oxlint has linted
58
+ // nothing. A `command` forks this process, and once the linter is running
59
+ // Linux can refuse the fork: the linter's per-thread AST buffers merge
60
+ // into one mapping larger than RAM and swap together, which the default
61
+ // overcommit heuristic refuses to duplicate. The source keeps the answer,
62
+ // and a failure, so the rules read what was read here — a term's several
63
+ // commands run at once. A report that cannot be read is not a load
64
+ // failure — the campaigns rule reports it once, on the first file a
65
+ // campaign naming it selects; one that does not parse is.
66
+ prepare: async (policy) => {
67
+ const campaigns = campaignsOf(policy);
68
+ await Promise.all(reportSpecsOf(campaigns.campaignRules).map(async (spec) => {
69
+ if (campaigns.reports.read !== undefined)
70
+ return campaigns.reports.read(spec);
71
+ try {
72
+ campaigns.reports.diagnosticsOf(spec, "");
73
+ }
74
+ catch (cause) {
75
+ if (!(cause instanceof ReportUnavailable))
76
+ throw cause;
77
+ }
78
+ }));
79
+ },
80
+ };
81
+ //# sourceMappingURL=live.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live.js","sourceRoot":"","sources":["../../../src/campaigns/live.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,GAEd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,YAAY,EACZ,eAAe,EACf,qBAAqB,EAErB,iBAAiB,GAClB,MAAM,iBAAiB,C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AS;oBAC3B,OAAO,EAAE,oBAAoB,CAAC,QAAQ,CAAC;iBACxC,CAAC;aACH;YACD,WAAW,EAAE,EAAE;SAChB,CAAC;IACJ,CAAC;IACD,uEAAuE;IACvE,0EAA0E;IAC1E,uEAAuE;IACvE,wEAAwE;IACxE,0EAA0E;IAC1E,yEAAyE;IACzE,mEAAmE;IACnE,oEAAoE;IACpE,0DAA0D;IAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QACxB,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;QACtC,MAAM,OAAO,CAAC,GAAG,CACf,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACxD,IAAI,SAAS,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS;gBAAE,OAAO,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC9E,IAAI,CAAC;gBACH,SAAS,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC5C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,CAAC,KAAK,YAAY,iBAAiB,CAAC;oBAAE,MAAM,KAAK,CAAC;YACzD,CAAC;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -0,0 +1,46 @@
1
+ // The package the family comes in, and the manifest keys it would claim: a
2
+ // manifest that uses one without it is refused naming the package, rather
3
+ // than as a misspelling.
4
+ export const CAMPAIGNS_PACKAGE = "@goodbones/campaigns";
5
+ const UNINSTALLED = {
6
+ manifestKeys: ["campaigns", "ledger"],
7
+ install: CAMPAIGNS_PACKAGE,
8
+ };
9
+ // The `campaigns` rule without the family. oxlint refuses a configuration
10
+ // naming a rule the plugin does not register, with no word of why, so the
11
+ // rule is registered anyway and says what to install — once per process, on
12
+ // the first file, rather than on every file of the run.
13
+ export const notInstalledRule = () => {
14
+ let said = false;
15
+ return {
16
+ meta: {
17
+ type: "problem",
18
+ docs: { description: `the campaigns, which need ${CAMPAIGNS_PACKAGE} installed` },
19
+ schema: [],
20
+ },
21
+ createOnce(context) {
22
+ return {
23
+ before() {
24
+ return !said;
25
+ },
26
+ Program(_node) {
27
+ if (said)
28
+ return;
29
+ said = true;
30
+ context.report({
31
+ message: `architecture/campaigns needs \`${CAMPAIGNS_PACKAGE}\`, which is not installed. ` +
32
+ `Install it beside @goodbones/oxlint, or turn the rule off.`,
33
+ loc: { line: 1, column: 0 },
34
+ });
35
+ },
36
+ };
37
+ },
38
+ };
39
+ };
40
+ // The family, when it is not installed.
41
+ export const campaignsNotInstalled = {
42
+ host: { rule: notInstalledRule },
43
+ compose: (_repoRoot, _configPath, manifest) => Promise.resolve({ manifest, extensions: [], uninstalled: [UNINSTALLED] }),
44
+ prepare: () => Promise.resolve(),
45
+ };
46
+ //# sourceMappingURL=none.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"none.js","sourceRoot":"","sources":["../../../src/campaigns/none.ts"],"names":[],"mappings":"AAKA,2EAA2E;AAC3E,0EAA0E;AAC1E,yBAAyB;AACzB,MAAM,CAAC,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AAExD,MAAM,WAAW,GAAyB;IACxC,YAAY,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC;IACrC,OAAO,EAAE,iBAAiB;CAC3B,CAAC;AAEF,0EAA0E;AAC1E,0EAA0E;AAC1E,4EAA4E;AAC5E,wDAAwD;AACxD,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAe,EAAE;IAC/C,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,OAAO;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,SAAkB;YACxB,IAAI,EAAE,EAAE,WAAW,EAAE,6BAA6B,iBAAiB,YAAY,EAAE;YACjF,MAAM,EAAE,EAAE;SACX;QACD,UAAU,CAAC,OAAoB;YAC7B,OAAO;gBACL,MAAM;oBACJ,OAAO,CAAC,IAAI,CAAC;gBACf,CAAC;gBACD,OAAO,CAAC,KAAc;oBACpB,IAAI,IAAI;wBAAE,OAAO;oBACjB,IAAI,GAAG,IAAI,CAAC;oBACZ,OAAO,CAAC,MAAM,CAAC;wBACb,OAAO,EACL,kCAAkC,iBAAiB,8BAA8B;4BACjF,4DAA4D;wBAC9D,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;qBAC5B,CAAC,CAAC;gBACL,CAAC;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,wCAAwC;AACxC,MAAM,CAAC,MAAM,qBAAqB,GAAoB;IACpD,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;IAChC,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,CAC5C,OAAO,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;IAC3E,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;CACjC,CAAC"}
@@ -0,0 +1,163 @@
1
+ import * as path from "node:path";
2
+ import { campaignsOf, campaignsSelecting, detectorCandidatesOf, detectorOf, evaluateObjectives, isShared, ledgerKeyOf, ledgerPhaseOf, membershipOf, needsSyntax, objectivesInWindow, positionOf, reconcileSector, sectorEntryOf, sharedWindow, } from "@goodbones/campaigns";
3
+ import { formatMessage, ReportUnavailable } from "@goodbones/core";
4
+ import { sourceFactsOf } from "@goodbones/typescript";
5
+ import { factsOfProgram, toRepoRelative, } from "../oxlint-api.js";
6
+ const unledgered = (policy, rule, sector, root, hits) => {
7
+ const carried = new Set();
8
+ const byObjective = new Map();
9
+ for (const hit of hits) {
10
+ byObjective.set(hit.objective, [...(byObjective.get(hit.objective) ?? []), hit]);
11
+ }
12
+ for (const [objectiveId, own] of byObjective) {
13
+ const objective = rule.objectives.find((one) => one.id === objectiveId);
14
+ const ledger = campaignsOf(policy).ledgers.get(ledgerKeyOf(rule.id, objectiveId));
15
+ if (objective === undefined || ledger === undefined)
16
+ continue;
17
+ const entries = own.map((hit) => sectorEntryOf(hit.violation, root));
18
+ const known = new Set(reconcileSector(ledger, sector, entries, objective.unit).ledgered);
19
+ own.forEach((hit, i) => {
20
+ if (known.has(entries[i] ?? ""))
21
+ carried.add(hit);
22
+ });
23
+ }
24
+ return hits.filter((hit) => !carried.has(hit));
25
+ };
26
+ // The objectives in window for the sector, read off the ledgers: the phase
27
+ // they place it at (a sector no `clear` has placed stands at the first, as
28
+ // the legacy does), with a prerequisite counted by what the shared files'
29
+ // ledger carries. On the shared files themselves, which stand on no phase, it is
30
+ // what is read over it. A prerequisite is never reported on a sector's own
31
+ // file — its holdouts are the shared files'.
32
+ const inWindowFor = (policy, rule, sector) => {
33
+ const window = isShared(rule, sector)
34
+ ? sharedWindow(rule)
35
+ : objectivesInWindow(rule, ledgerPhaseOf(policy, rule, sector), positionOf(rule, campaignsOf(policy).sectorRecords.get(ledgerKeyOf(rule.id, sector)))).filter((one) => !one.overShared);
36
+ return window.filter((one) => one.detect !== null);
37
+ };
38
+ // A `report` a campaign names that cannot be read — a command the kernel
39
+ // refused to spawn, a file no step wrote — is one fact about the run, not
40
+ // one about each file the campaign selects. The live source keeps the
41
+ // failure per spec; this keeps which failures have been said, so the first
42
+ // selected file carries the notice and the rest stay quiet. Without it, a
43
+ // lint of eight hundred files is eight hundred copies of oxlint's generic
44
+ // "error running JS plugin", with the cause dropped by the terser formats.
45
+ const aside = (cause) => `A report a campaign names could not be read, so no campaign naming it is judged in this ` +
46
+ `run: ${cause.message}`;
47
+ export const makeCampaignsRule = (policy, indexes = new Map()) => {
48
+ // Per rule instance, which is per plugin load — one process — rather than
49
+ // per `createOnce`, which a host may call more often than that.
50
+ const said = new Set();
51
+ const known = new Set(policy.languages.flatMap((one) => one.extensions));
52
+ return {
53
+ meta: {
54
+ type: "problem",
55
+ docs: {
56
+ description: "the campaigns: every place a pattern the repository is migrating away from still occurs, in a sector whose phase asks for it, that its ledger does not carry",
57
+ },
58
+ schema: [],
59
+ },
60
+ createOnce(context) {
61
+ let file = "";
62
+ let selected = [];
63
+ return {
64
+ before() {
65
+ file = toRepoRelative(policy.repoRoot, context.filename);
66
+ if (file.startsWith(".."))
67
+ return false;
68
+ // A file the packs would not walk — one oxlint lints anyway — is
69
+ // seen only by a campaign that widened its scope to it, so both
70
+ // hosts answer about the same files.
71
+ const extension = path.extname(file);
72
+ selected = campaignsSelecting(campaignsOf(policy).campaignRules, file).filter((rule) => known.size === 0 || known.has(extension) || rule.extensions.includes(extension));
73
+ return selected.length > 0;
74
+ },
75
+ Program(node) {
76
+ const text = context.sourceCode.text;
77
+ const detectors = selected.flatMap((rule) => [
78
+ ...rule.objectives.flatMap((one) => {
79
+ const detect = detectorOf(one);
80
+ return detect === null ? [] : [detect];
81
+ }),
82
+ ...(rule.perimeter?.kind === "match" ? [rule.perimeter.detect] : []),
83
+ ]);
84
+ const input = {
85
+ file,
86
+ text,
87
+ facts: sourceFactsOf(factsOfProgram(file, node)),
88
+ resolver: policy.resolver,
89
+ fileSystem: policy.fileSystem,
90
+ syntax: needsSyntax(detectors) ? policy.syntax.parse(file, text) : null,
91
+ functions: campaignsOf(policy).functions,
92
+ reports: campaignsOf(policy).reports,
93
+ };
94
+ // One campaign at a time, so a report one of them cannot read costs
95
+ // that campaign's answer for this file and not its neighbours'.
96
+ const unrecorded = [];
97
+ for (const rule of selected) {
98
+ try {
99
+ const perimeter = rule.perimeter;
100
+ const anchors = perimeter?.kind === "match"
101
+ ? detectorCandidatesOf(perimeter.detect, perimeter.unit, input).map((one) => one.key.split("#")[0] ?? one.key)
102
+ : [];
103
+ const place = membershipOf(rule, file, indexes.get(rule.id) ?? null, anchors);
104
+ // Hits grouped by the sector they fall in, then judged
105
+ // against that sector's window and ledger.
106
+ const bySector = new Map();
107
+ const windows = new Map();
108
+ const placedAt = (subject) => {
109
+ const placement = place(subject);
110
+ if (placement === null)
111
+ return null;
112
+ if (!windows.has(placement.sector)) {
113
+ windows.set(placement.sector, new Set(inWindowFor(policy, rule, placement.sector).map((one) => one.id)));
114
+ }
115
+ return placement;
116
+ };
117
+ const whole = placedAt(null);
118
+ const candidates = whole === null
119
+ ? rule.objectives.filter((one) => one.detect !== null)
120
+ : rule.objectives.filter((one) => one.detect !== null && (windows.get(whole.sector)?.has(one.id) ?? false));
121
+ if (perimeter?.kind !== "match" && whole === null)
122
+ continue;
123
+ for (const hit of evaluateObjectives(candidates, input)) {
124
+ const placement = placedAt(hit.violation.subject);
125
+ if (placement === null)
126
+ continue;
127
+ if (!(windows.get(placement.sector)?.has(hit.objective) ?? false))
128
+ continue;
129
+ const group = bySector.get(placement.sector) ?? { root: placement.root, hits: [] };
130
+ group.hits.push(hit);
131
+ bySector.set(placement.sector, group);
132
+ }
133
+ for (const [sector, group] of bySector) {
134
+ for (const hit of unledgered(policy, rule, sector, group.root, group.hits)) {
135
+ unrecorded.push(hit);
136
+ }
137
+ }
138
+ }
139
+ catch (cause) {
140
+ if (!(cause instanceof ReportUnavailable))
141
+ throw cause;
142
+ const message = aside(cause);
143
+ if (said.has(message))
144
+ continue;
145
+ said.add(message);
146
+ context.report({ message, loc: { line: 1, column: 0 } });
147
+ }
148
+ }
149
+ for (const hit of unrecorded) {
150
+ // A match lands where it was found; a file-unit hit, on line 1, as
151
+ // the structure rule places a finding about the file itself.
152
+ const at = hit.range ?? { start: { line: 0, column: 0 } };
153
+ context.report({
154
+ message: formatMessage(hit.violation),
155
+ loc: { line: at.start.line + 1, column: at.start.column },
156
+ });
157
+ }
158
+ },
159
+ };
160
+ },
161
+ };
162
+ };
163
+ //# sourceMappingURL=rule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule.js","sourceRoot":"","sources":["../../../src/campaigns/rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,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aAAa,CAAC,GAAG,CAAC,SAAS,CAAC;4BACrC,GAAG,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE;yBAC1D,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,29 +1,61 @@
1
1
  import * as path from "node:path";
2
- import { findManifestFile, loadPolicy, makeFileSystemLive, readManifestFile, } from "@goodbones/core";
2
+ import { findManifestFile, importOptional, loadPolicy, makeFileSystemLive, readManifestFile, } from "@goodbones/core";
3
3
  import { typescriptLanguage } from "@goodbones/typescript";
4
4
  import * as Result from "effect/Result";
5
+ import { campaignsNotInstalled } from "./campaigns/none.js";
6
+ // The campaigns family, when `@goodbones/campaigns` is installed beside the
7
+ // plugin, and `none` when it is not. Everything that names the package is
8
+ // under `campaigns/`, reached through this one import.
9
+ const hostCampaigns = async () => (await importOptional(() => import("./campaigns/live.js"), "@goodbones/campaigns"))
10
+ ?.liveCampaigns ?? campaignsNotInstalled;
11
+ // The clock the campaigns are judged by; `ARCHITECTURE_NOW` pins it, as it
12
+ // does for the CLI.
13
+ const hostNow = () => {
14
+ const pinned = process.env.ARCHITECTURE_NOW;
15
+ if (pinned === undefined || pinned === "")
16
+ return Date.now();
17
+ const parsed = /^\d+$/.test(pinned) ? Number(pinned) : Date.parse(pinned);
18
+ if (Number.isNaN(parsed)) {
19
+ throw new Error(`ARCHITECTURE_NOW is ${JSON.stringify(pinned)}, which is not a date.`);
20
+ }
21
+ return parsed;
22
+ };
5
23
  // The plugin's composition root: read the manifest file, construct the
6
24
  // language packs and the live file system, and hand them to the loader. A load
7
25
  // failure throws out of here and out of oxlint's import of the plugin — a
8
26
  // plugin that came up with no policy would report nothing and be
9
27
  // indistinguishable from a clean codebase.
10
- export const loadPolicyFromFile = async (repoRoot, configFilename) => {
28
+ //
29
+ // `given` is the family to compose: found by `hostCampaigns` unless a test
30
+ // names one, which is how the plugin is run as if the package were absent.
31
+ export const loadPolicyFromFile = async (repoRoot, configFilename, given) => {
11
32
  // Named, or discovered: architecture.yaml, .yml, .json, or .config.mjs,
12
33
  // exactly one of which may be present.
13
34
  const configPath = configFilename === undefined
14
35
  ? findManifestFile(repoRoot)
15
36
  : path.resolve(repoRoot, configFilename);
16
37
  const read = await readManifestFile(configPath);
38
+ const campaigns = given ?? (await hostCampaigns());
39
+ const composed = await campaigns.compose(repoRoot, configPath, read.manifest);
40
+ // The syntax matcher, for the campaigns family's `syntax` term, is an
41
+ // optional peer with a native binary: composed into the pack when it is
42
+ // installed, and the plugin parses with it for that family only. A
43
+ // campaign that needs it without it is refused at load, naming it.
44
+ const astGrep = await importOptional(() => import("@goodbones/ast-grep"), "@goodbones/ast-grep");
17
45
  const loaded = loadPolicy({
18
46
  repoRoot,
19
47
  configPath,
20
- manifest: read.manifest,
48
+ manifest: composed.manifest,
21
49
  locate: read.locate,
22
- languages: [typescriptLanguage()],
50
+ languages: [typescriptLanguage(astGrep === null ? {} : { syntax: astGrep.astGrepMatcher() })],
23
51
  fileSystem: makeFileSystemLive(repoRoot),
52
+ extensions: composed.extensions,
53
+ uninstalled: composed.uninstalled,
54
+ now: hostNow(),
24
55
  });
25
56
  if (Result.isFailure(loaded))
26
57
  throw loaded.failure;
27
- return loaded.success;
58
+ await campaigns.prepare(loaded.success);
59
+ return { ...loaded.success, campaigns: campaigns.host };
28
60
  };
29
61
  //# sourceMappingURL=config-loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-loader.js","sourceRoot":"","sources":["../../src/config-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,gBAAgB,EAEhB,UAAU,EACV,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBA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