uilint 0.2.141 → 0.2.142

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.
@@ -6,7 +6,7 @@ import {
6
6
  // src/utils/plugin-loader.ts
7
7
  import { createRequire } from "module";
8
8
  import { join } from "path";
9
- var KNOWN_PLUGIN_PACKAGES = ["uilint-vision", "uilint-semantic"];
9
+ var KNOWN_PLUGIN_PACKAGES = ["uilint-vision", "uilint-semantic", "uilint-duplicates"];
10
10
  async function discoverPlugins(resolveFrom) {
11
11
  const manifests = [];
12
12
  for (const pkg of KNOWN_PLUGIN_PACKAGES) {
@@ -53,4 +53,4 @@ export {
53
53
  discoverPlugins,
54
54
  loadPluginESLintRules
55
55
  };
56
- //# sourceMappingURL=chunk-X4PN5A4G.js.map
56
+ //# sourceMappingURL=chunk-WG2WZTB2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/plugin-loader.ts"],"sourcesContent":["/**\n * Dynamic plugin loader for the CLI.\n *\n * Probes known plugin package names for a `cli-manifest` subpath export.\n * Each manifest describes the CLI flag, help text, and registration entry\n * point, keeping the core CLI free of plugin-specific knowledge.\n */\n\nimport { createRequire } from \"module\";\nimport { join } from \"path\";\nimport { logInfo } from \"./prompts.js\";\n\n/**\n * Metadata a plugin exposes via its `<pkg>/cli-manifest` subpath export.\n * Plugins define a plain object matching this shape — no shared type import needed.\n */\nexport interface PluginCLIManifest {\n /** npm package name, e.g. \"uilint-vision\" */\n packageName: string;\n /** CLI flag name (without --), e.g. \"vision\" */\n cliFlag: string;\n /** Description shown in --help */\n cliDescription: string;\n /** Import specifier for the register module, e.g. \"uilint-vision/eslint-rules/register\" */\n registerSpecifier: string;\n}\n\n/** Package names to probe for CLI manifests */\nconst KNOWN_PLUGIN_PACKAGES = [\"uilint-vision\", \"uilint-semantic\", \"uilint-duplicates\"];\n\n/**\n * Discover available plugin manifests by probing `<pkg>/cli-manifest`.\n *\n * @param resolveFrom - Optional project path to resolve plugins from.\n * When provided, uses createRequire anchored to the project's package.json\n * so plugins installed in the project's node_modules can be found.\n * @returns Array of discovered plugin manifests\n */\nexport async function discoverPlugins(\n resolveFrom?: string,\n): Promise<PluginCLIManifest[]> {\n const manifests: PluginCLIManifest[] = [];\n\n for (const pkg of KNOWN_PLUGIN_PACKAGES) {\n const specifier = `${pkg}/cli-manifest`;\n try {\n let mod: { cliManifest?: PluginCLIManifest };\n if (resolveFrom) {\n const req = createRequire(join(resolveFrom, \"package.json\"));\n const resolved = req.resolve(specifier);\n mod = (await import(resolved)) as typeof mod;\n } else {\n mod = (await import(specifier)) as typeof mod;\n }\n if (mod.cliManifest) {\n manifests.push(mod.cliManifest);\n }\n } catch {\n // Plugin not installed — skip silently\n }\n }\n\n return manifests;\n}\n\n/**\n * Load ESLint rules from discovered plugins by importing their register modules.\n *\n * @param manifests - Plugin manifests (from discoverPlugins)\n * @param resolveFrom - Optional project path to resolve plugins from.\n * @returns Array of loaded plugin package names\n */\nexport async function loadPluginESLintRules(\n manifests: PluginCLIManifest[],\n resolveFrom?: string,\n): Promise<string[]> {\n const loaded: string[] = [];\n\n for (const manifest of manifests) {\n try {\n if (resolveFrom) {\n const req = createRequire(join(resolveFrom, \"package.json\"));\n const resolved = req.resolve(manifest.registerSpecifier);\n await import(resolved);\n } else {\n await import(manifest.registerSpecifier);\n }\n loaded.push(manifest.packageName);\n } catch {\n // Plugin register module not available — skip silently\n }\n }\n\n if (loaded.length > 0) {\n logInfo(`Loaded plugin rules: ${loaded.join(\", \")}`);\n }\n\n return loaded;\n}\n"],"mappings":";;;;;;AAQA,SAAS,qBAAqB;AAC9B,SAAS,YAAY;AAmBrB,IAAM,wBAAwB,CAAC,iBAAiB,mBAAmB,mBAAmB;AAUtF,eAAsB,gBACpB,aAC8B;AAC9B,QAAM,YAAiC,CAAC;AAExC,aAAW,OAAO,uBAAuB;AACvC,UAAM,YAAY,GAAG,GAAG;AACxB,QAAI;AACF,UAAI;AACJ,UAAI,aAAa;AACf,cAAM,MAAM,cAAc,KAAK,aAAa,cAAc,CAAC;AAC3D,cAAM,WAAW,IAAI,QAAQ,SAAS;AACtC,cAAO,MAAM,OAAO;AAAA,MACtB,OAAO;AACL,cAAO,MAAM,OAAO;AAAA,MACtB;AACA,UAAI,IAAI,aAAa;AACnB,kBAAU,KAAK,IAAI,WAAW;AAAA,MAChC;AAAA,IACF,QAAQ;AAAA,IAER;AAAA,EACF;AAEA,SAAO;AACT;AASA,eAAsB,sBACpB,WACA,aACmB;AACnB,QAAM,SAAmB,CAAC;AAE1B,aAAW,YAAY,WAAW;AAChC,QAAI;AACF,UAAI,aAAa;AACf,cAAM,MAAM,cAAc,KAAK,aAAa,cAAc,CAAC;AAC3D,cAAM,WAAW,IAAI,QAAQ,SAAS,iBAAiB;AACvD,cAAM,OAAO;AAAA,MACf,OAAO;AACL,cAAM,OAAO,SAAS;AAAA,MACxB;AACA,aAAO,KAAK,SAAS,WAAW;AAAA,IAClC,QAAQ;AAAA,IAER;AAAA,EACF;AAEA,MAAI,OAAO,SAAS,GAAG;AACrB,YAAQ,wBAAwB,OAAO,KAAK,IAAI,CAAC,EAAE;AAAA,EACrD;AAEA,SAAO;AACT;","names":[]}
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  discoverPlugins,
18
18
  loadPluginESLintRules
19
- } from "./chunk-X4PN5A4G.js";
19
+ } from "./chunk-WG2WZTB2.js";
20
20
  import {
21
21
  createSpinner,
22
22
  intro,
@@ -5756,7 +5756,7 @@ program.addCommand(createDuplicatesCommand());
5756
5756
  program.addCommand(createManifestCommand());
5757
5757
  program.addCommand(createSocketCommand());
5758
5758
  program.command("upgrade").description("Update installed ESLint rules to latest versions").option("--check", "Show available updates without applying").option("-y, --yes", "Auto-confirm all updates").option("--dry-run", "Show what would change without modifying files").option("--rule <id>", "Upgrade only a specific rule").action(async (options) => {
5759
- const { upgrade } = await import("./upgrade-GR6OJBXD.js");
5759
+ const { upgrade } = await import("./upgrade-TPZ62BT2.js");
5760
5760
  await upgrade({
5761
5761
  check: options.check,
5762
5762
  yes: options.yes,
@@ -5765,14 +5765,14 @@ program.command("upgrade").description("Update installed ESLint rules to latest
5765
5765
  });
5766
5766
  });
5767
5767
  async function main() {
5768
- const { discoverPlugins: discoverPlugins2 } = await import("./plugin-loader-M2W3SMJ5.js");
5768
+ const { discoverPlugins: discoverPlugins2 } = await import("./plugin-loader-O6PNFN6D.js");
5769
5769
  const pluginManifests = await discoverPlugins2();
5770
5770
  for (const manifest of pluginManifests) {
5771
5771
  initCommand.option(`--${manifest.cliFlag}`, manifest.cliDescription);
5772
5772
  }
5773
5773
  initCommand.action(async (options) => {
5774
5774
  const plugins = pluginManifests.filter((m) => options[m.cliFlag]).map((m) => m.cliFlag);
5775
- const { initUI } = await import("./init-ui-DQZARD3F.js");
5775
+ const { initUI } = await import("./init-ui-KJYYI5DH.js");
5776
5776
  await initUI({
5777
5777
  force: options.force,
5778
5778
  react: options.react,
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  discoverPlugins,
14
14
  loadPluginESLintRules
15
- } from "./chunk-X4PN5A4G.js";
15
+ } from "./chunk-WG2WZTB2.js";
16
16
  import "./chunk-ZDSDZNIB.js";
17
17
  import {
18
18
  pc
@@ -1892,4 +1892,4 @@ ${pc.blue("Running tests with coverage...")}`);
1892
1892
  export {
1893
1893
  initUI
1894
1894
  };
1895
- //# sourceMappingURL=init-ui-DQZARD3F.js.map
1895
+ //# sourceMappingURL=init-ui-KJYYI5DH.js.map
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  discoverPlugins,
4
4
  loadPluginESLintRules
5
- } from "./chunk-X4PN5A4G.js";
5
+ } from "./chunk-WG2WZTB2.js";
6
6
  import "./chunk-CZNPG4UI.js";
7
7
  export {
8
8
  discoverPlugins,
9
9
  loadPluginESLintRules
10
10
  };
11
- //# sourceMappingURL=plugin-loader-M2W3SMJ5.js.map
11
+ //# sourceMappingURL=plugin-loader-O6PNFN6D.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  discoverPlugins,
4
4
  loadPluginESLintRules
5
- } from "./chunk-X4PN5A4G.js";
5
+ } from "./chunk-WG2WZTB2.js";
6
6
  import {
7
7
  getInstalledRuleVersions,
8
8
  updateManifestRule
@@ -590,4 +590,4 @@ async function upgrade(options) {
590
590
  export {
591
591
  upgrade
592
592
  };
593
- //# sourceMappingURL=upgrade-GR6OJBXD.js.map
593
+ //# sourceMappingURL=upgrade-TPZ62BT2.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uilint",
3
- "version": "0.2.141",
3
+ "version": "0.2.142",
4
4
  "description": "CLI for UILint - AI-powered UI consistency checking",
5
5
  "author": "Peter Suggate",
6
6
  "repository": {
@@ -49,13 +49,14 @@
49
49
  "react": "^19.2.3",
50
50
  "typescript": "^5.9.3",
51
51
  "ws": "^8.19.0",
52
- "uilint-core": "0.2.141",
53
- "uilint-eslint": "0.2.141",
54
- "uilint-duplicates": "0.2.141"
52
+ "uilint-core": "0.2.142",
53
+ "uilint-duplicates": "0.2.142",
54
+ "uilint-eslint": "0.2.142"
55
55
  },
56
56
  "peerDependencies": {
57
- "uilint-vision": "0.2.141",
58
- "uilint-semantic": "0.2.141"
57
+ "uilint-vision": "0.2.142",
58
+ "uilint-duplicates": "0.2.142",
59
+ "uilint-semantic": "0.2.142"
59
60
  },
60
61
  "peerDependenciesMeta": {
61
62
  "uilint-vision": {
@@ -63,6 +64,9 @@
63
64
  },
64
65
  "uilint-semantic": {
65
66
  "optional": true
67
+ },
68
+ "uilint-duplicates": {
69
+ "optional": true
66
70
  }
67
71
  },
68
72
  "optionalDependencies": {
@@ -79,7 +83,7 @@
79
83
  "ink-testing-library": "^4.0.0",
80
84
  "tsup": "^8.5.1",
81
85
  "vitest": "^4.0.17",
82
- "uilint-react": "0.2.141"
86
+ "uilint-react": "0.2.142"
83
87
  },
84
88
  "keywords": [
85
89
  "cli",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/plugin-loader.ts"],"sourcesContent":["/**\n * Dynamic plugin loader for the CLI.\n *\n * Probes known plugin package names for a `cli-manifest` subpath export.\n * Each manifest describes the CLI flag, help text, and registration entry\n * point, keeping the core CLI free of plugin-specific knowledge.\n */\n\nimport { createRequire } from \"module\";\nimport { join } from \"path\";\nimport { logInfo } from \"./prompts.js\";\n\n/**\n * Metadata a plugin exposes via its `<pkg>/cli-manifest` subpath export.\n * Plugins define a plain object matching this shape — no shared type import needed.\n */\nexport interface PluginCLIManifest {\n /** npm package name, e.g. \"uilint-vision\" */\n packageName: string;\n /** CLI flag name (without --), e.g. \"vision\" */\n cliFlag: string;\n /** Description shown in --help */\n cliDescription: string;\n /** Import specifier for the register module, e.g. \"uilint-vision/eslint-rules/register\" */\n registerSpecifier: string;\n}\n\n/** Package names to probe for CLI manifests */\nconst KNOWN_PLUGIN_PACKAGES = [\"uilint-vision\", \"uilint-semantic\"];\n\n/**\n * Discover available plugin manifests by probing `<pkg>/cli-manifest`.\n *\n * @param resolveFrom - Optional project path to resolve plugins from.\n * When provided, uses createRequire anchored to the project's package.json\n * so plugins installed in the project's node_modules can be found.\n * @returns Array of discovered plugin manifests\n */\nexport async function discoverPlugins(\n resolveFrom?: string,\n): Promise<PluginCLIManifest[]> {\n const manifests: PluginCLIManifest[] = [];\n\n for (const pkg of KNOWN_PLUGIN_PACKAGES) {\n const specifier = `${pkg}/cli-manifest`;\n try {\n let mod: { cliManifest?: PluginCLIManifest };\n if (resolveFrom) {\n const req = createRequire(join(resolveFrom, \"package.json\"));\n const resolved = req.resolve(specifier);\n mod = (await import(resolved)) as typeof mod;\n } else {\n mod = (await import(specifier)) as typeof mod;\n }\n if (mod.cliManifest) {\n manifests.push(mod.cliManifest);\n }\n } catch {\n // Plugin not installed — skip silently\n }\n }\n\n return manifests;\n}\n\n/**\n * Load ESLint rules from discovered plugins by importing their register modules.\n *\n * @param manifests - Plugin manifests (from discoverPlugins)\n * @param resolveFrom - Optional project path to resolve plugins from.\n * @returns Array of loaded plugin package names\n */\nexport async function loadPluginESLintRules(\n manifests: PluginCLIManifest[],\n resolveFrom?: string,\n): Promise<string[]> {\n const loaded: string[] = [];\n\n for (const manifest of manifests) {\n try {\n if (resolveFrom) {\n const req = createRequire(join(resolveFrom, \"package.json\"));\n const resolved = req.resolve(manifest.registerSpecifier);\n await import(resolved);\n } else {\n await import(manifest.registerSpecifier);\n }\n loaded.push(manifest.packageName);\n } catch {\n // Plugin register module not available — skip silently\n }\n }\n\n if (loaded.length > 0) {\n logInfo(`Loaded plugin rules: ${loaded.join(\", \")}`);\n }\n\n return loaded;\n}\n"],"mappings":";;;;;;AAQA,SAAS,qBAAqB;AAC9B,SAAS,YAAY;AAmBrB,IAAM,wBAAwB,CAAC,iBAAiB,iBAAiB;AAUjE,eAAsB,gBACpB,aAC8B;AAC9B,QAAM,YAAiC,CAAC;AAExC,aAAW,OAAO,uBAAuB;AACvC,UAAM,YAAY,GAAG,GAAG;AACxB,QAAI;AACF,UAAI;AACJ,UAAI,aAAa;AACf,cAAM,MAAM,cAAc,KAAK,aAAa,cAAc,CAAC;AAC3D,cAAM,WAAW,IAAI,QAAQ,SAAS;AACtC,cAAO,MAAM,OAAO;AAAA,MACtB,OAAO;AACL,cAAO,MAAM,OAAO;AAAA,MACtB;AACA,UAAI,IAAI,aAAa;AACnB,kBAAU,KAAK,IAAI,WAAW;AAAA,MAChC;AAAA,IACF,QAAQ;AAAA,IAER;AAAA,EACF;AAEA,SAAO;AACT;AASA,eAAsB,sBACpB,WACA,aACmB;AACnB,QAAM,SAAmB,CAAC;AAE1B,aAAW,YAAY,WAAW;AAChC,QAAI;AACF,UAAI,aAAa;AACf,cAAM,MAAM,cAAc,KAAK,aAAa,cAAc,CAAC;AAC3D,cAAM,WAAW,IAAI,QAAQ,SAAS,iBAAiB;AACvD,cAAM,OAAO;AAAA,MACf,OAAO;AACL,cAAM,OAAO,SAAS;AAAA,MACxB;AACA,aAAO,KAAK,SAAS,WAAW;AAAA,IAClC,QAAQ;AAAA,IAER;AAAA,EACF;AAEA,MAAI,OAAO,SAAS,GAAG;AACrB,YAAQ,wBAAwB,OAAO,KAAK,IAAI,CAAC,EAAE;AAAA,EACrD;AAEA,SAAO;AACT;","names":[]}