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.
- package/dist/{chunk-X4PN5A4G.js → chunk-WG2WZTB2.js} +2 -2
- package/dist/chunk-WG2WZTB2.js.map +1 -0
- package/dist/index.js +4 -4
- package/dist/{init-ui-DQZARD3F.js → init-ui-KJYYI5DH.js} +2 -2
- package/dist/{plugin-loader-M2W3SMJ5.js → plugin-loader-O6PNFN6D.js} +2 -2
- package/dist/{upgrade-GR6OJBXD.js → upgrade-TPZ62BT2.js} +2 -2
- package/package.json +11 -7
- package/dist/chunk-X4PN5A4G.js.map +0 -1
- /package/dist/{init-ui-DQZARD3F.js.map → init-ui-KJYYI5DH.js.map} +0 -0
- /package/dist/{plugin-loader-M2W3SMJ5.js.map → plugin-loader-O6PNFN6D.js.map} +0 -0
- /package/dist/{upgrade-GR6OJBXD.js.map → upgrade-TPZ62BT2.js.map} +0 -0
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
1895
|
+
//# sourceMappingURL=init-ui-KJYYI5DH.js.map
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
discoverPlugins,
|
|
4
4
|
loadPluginESLintRules
|
|
5
|
-
} from "./chunk-
|
|
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-
|
|
11
|
+
//# sourceMappingURL=plugin-loader-O6PNFN6D.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
discoverPlugins,
|
|
4
4
|
loadPluginESLintRules
|
|
5
|
-
} from "./chunk-
|
|
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-
|
|
593
|
+
//# sourceMappingURL=upgrade-TPZ62BT2.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uilint",
|
|
3
|
-
"version": "0.2.
|
|
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.
|
|
53
|
-
"uilint-
|
|
54
|
-
"uilint-
|
|
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.
|
|
58
|
-
"uilint-
|
|
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.
|
|
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":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|