uilint 0.2.42 → 0.2.43
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-CZNPG4UI.js +118 -0
- package/dist/chunk-CZNPG4UI.js.map +1 -0
- package/dist/{chunk-OTU5FY6B.js → chunk-JPE27ROY.js} +68 -2
- package/dist/chunk-JPE27ROY.js.map +1 -0
- package/dist/{chunk-PVUDWWTL.js → chunk-KNZVCCXM.js} +41 -154
- package/dist/chunk-KNZVCCXM.js.map +1 -0
- package/dist/{plan-QVR3RBLG.js → chunk-Y7ZNZFVZ.js} +2 -245
- package/dist/chunk-Y7ZNZFVZ.js.map +1 -0
- package/dist/chunk-ZDSDZNIB.js +93 -0
- package/dist/chunk-ZDSDZNIB.js.map +1 -0
- package/dist/index.js +20 -9
- package/dist/index.js.map +1 -1
- package/dist/{install-ui-HG73W6P7.js → install-ui-COFD7H2I.js} +54 -11
- package/dist/install-ui-COFD7H2I.js.map +1 -0
- package/dist/plan-N453UW4O.js +259 -0
- package/dist/plan-N453UW4O.js.map +1 -0
- package/dist/upgrade-TGYLZ4QX.js +587 -0
- package/dist/upgrade-TGYLZ4QX.js.map +1 -0
- package/package.json +5 -5
- package/dist/chunk-OTU5FY6B.js.map +0 -1
- package/dist/chunk-PVUDWWTL.js.map +0 -1
- package/dist/install-ui-HG73W6P7.js.map +0 -1
- package/dist/plan-QVR3RBLG.js.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
confirm,
|
|
4
3
|
detectCoverageSetup,
|
|
5
4
|
detectNextAppRouter,
|
|
6
5
|
findEslintConfigFile,
|
|
@@ -9,24 +8,30 @@ import {
|
|
|
9
8
|
getUilintEslintConfigInfoFromSource,
|
|
10
9
|
injectCoverageConfig,
|
|
11
10
|
installEslintPlugin,
|
|
12
|
-
log,
|
|
13
|
-
multiselect,
|
|
14
|
-
note,
|
|
15
|
-
pc,
|
|
16
|
-
select,
|
|
17
|
-
text,
|
|
18
11
|
uninstallEslintPlugin
|
|
19
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KNZVCCXM.js";
|
|
20
13
|
import {
|
|
21
14
|
GENSTYLEGUIDE_COMMAND_MD,
|
|
22
15
|
loadSkill,
|
|
23
16
|
toInstallSpecifier
|
|
24
17
|
} from "./chunk-TWUDB36F.js";
|
|
18
|
+
import {
|
|
19
|
+
updateManifestRule
|
|
20
|
+
} from "./chunk-ZDSDZNIB.js";
|
|
21
|
+
import {
|
|
22
|
+
confirm,
|
|
23
|
+
log,
|
|
24
|
+
multiselect,
|
|
25
|
+
note,
|
|
26
|
+
pc,
|
|
27
|
+
select,
|
|
28
|
+
text
|
|
29
|
+
} from "./chunk-CZNPG4UI.js";
|
|
25
30
|
import {
|
|
26
31
|
detectPackageManager,
|
|
27
32
|
installDependencies,
|
|
28
33
|
runTestsWithCoverage
|
|
29
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JPE27ROY.js";
|
|
30
35
|
|
|
31
36
|
// src/commands/install-ui.tsx
|
|
32
37
|
import { render } from "ink";
|
|
@@ -2203,6 +2208,7 @@ import {
|
|
|
2203
2208
|
rmSync
|
|
2204
2209
|
} from "fs";
|
|
2205
2210
|
import { dirname as dirname4, join as join11 } from "path";
|
|
2211
|
+
import { fileURLToPath } from "url";
|
|
2206
2212
|
|
|
2207
2213
|
// src/utils/react-inject.ts
|
|
2208
2214
|
import { existsSync as existsSync5, readFileSync as readFileSync5, writeFileSync } from "fs";
|
|
@@ -3926,6 +3932,9 @@ async function executeAction(action, options) {
|
|
|
3926
3932
|
case "remove_directory": {
|
|
3927
3933
|
return await executeRemoveDirectory(action, options);
|
|
3928
3934
|
}
|
|
3935
|
+
case "update_manifest": {
|
|
3936
|
+
return await executeUpdateManifest(action, options);
|
|
3937
|
+
}
|
|
3929
3938
|
default: {
|
|
3930
3939
|
const _exhaustive = action;
|
|
3931
3940
|
return {
|
|
@@ -4204,6 +4213,40 @@ async function executeRemoveDirectory(action, options) {
|
|
|
4204
4213
|
}
|
|
4205
4214
|
return { action, success: true };
|
|
4206
4215
|
}
|
|
4216
|
+
async function executeUpdateManifest(action, options) {
|
|
4217
|
+
const { dryRun = false } = options;
|
|
4218
|
+
if (dryRun) {
|
|
4219
|
+
const ruleCount = Object.keys(action.rules).length;
|
|
4220
|
+
return {
|
|
4221
|
+
action,
|
|
4222
|
+
success: true,
|
|
4223
|
+
wouldDo: `Update manifest with ${ruleCount} rule(s) in: ${action.projectPath}`
|
|
4224
|
+
};
|
|
4225
|
+
}
|
|
4226
|
+
try {
|
|
4227
|
+
const cliVersion = getCliVersion();
|
|
4228
|
+
for (const [ruleId, version] of Object.entries(action.rules)) {
|
|
4229
|
+
updateManifestRule(action.projectPath, ruleId, version, cliVersion);
|
|
4230
|
+
}
|
|
4231
|
+
return { action, success: true };
|
|
4232
|
+
} catch (error) {
|
|
4233
|
+
return {
|
|
4234
|
+
action,
|
|
4235
|
+
success: false,
|
|
4236
|
+
error: error instanceof Error ? error.message : String(error)
|
|
4237
|
+
};
|
|
4238
|
+
}
|
|
4239
|
+
}
|
|
4240
|
+
function getCliVersion() {
|
|
4241
|
+
try {
|
|
4242
|
+
const __dirname = dirname4(fileURLToPath(import.meta.url));
|
|
4243
|
+
const pkgPath = join11(__dirname, "..", "..", "..", "package.json");
|
|
4244
|
+
const pkg = JSON.parse(readFileSync9(pkgPath, "utf-8"));
|
|
4245
|
+
return pkg.version || "0.0.0";
|
|
4246
|
+
} catch {
|
|
4247
|
+
return "0.0.0";
|
|
4248
|
+
}
|
|
4249
|
+
}
|
|
4207
4250
|
function deepMerge(target, source) {
|
|
4208
4251
|
const result = { ...target };
|
|
4209
4252
|
for (const key of Object.keys(source)) {
|
|
@@ -5334,7 +5377,7 @@ async function installUI(options = {}, executeOptions = {}) {
|
|
|
5334
5377
|
console.log("\nNo changes selected");
|
|
5335
5378
|
process.exit(0);
|
|
5336
5379
|
}
|
|
5337
|
-
const { createPlan } = await import("./plan-
|
|
5380
|
+
const { createPlan } = await import("./plan-N453UW4O.js");
|
|
5338
5381
|
const plan = createPlan(project, choices, { force: options.force });
|
|
5339
5382
|
if (hasUninstalls && uninstallSelections) {
|
|
5340
5383
|
for (const selection of uninstallSelections) {
|
|
@@ -5386,4 +5429,4 @@ ${pc.blue("Running tests with coverage...")}`);
|
|
|
5386
5429
|
export {
|
|
5387
5430
|
installUI
|
|
5388
5431
|
};
|
|
5389
|
-
//# sourceMappingURL=install-ui-
|
|
5432
|
+
//# sourceMappingURL=install-ui-COFD7H2I.js.map
|