@configjs/cli 1.0.9 → 1.1.1
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.
|
@@ -7459,12 +7459,12 @@ var huskyPlugin = {
|
|
|
7459
7459
|
const gitExists = await checkPathExists(gitDir);
|
|
7460
7460
|
if (!gitExists) {
|
|
7461
7461
|
logger.warn(
|
|
7462
|
-
".git directory not found. Husky
|
|
7462
|
+
".git directory not found. Husky hooks will be skipped. Initialize Git and run npm run prepare to set up Husky."
|
|
7463
7463
|
);
|
|
7464
7464
|
return {
|
|
7465
7465
|
files,
|
|
7466
|
-
success:
|
|
7467
|
-
message:
|
|
7466
|
+
success: true,
|
|
7467
|
+
message: 'Husky installed but hooks skipped (Git not initialized). Run "git init && npm run prepare" to initialize Husky hooks later.'
|
|
7468
7468
|
};
|
|
7469
7469
|
}
|
|
7470
7470
|
const huskyDir = join21(projectRoot, ".husky");
|
package/dist/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import "./chunk-QGM4M3NI.js";
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
|
|
7
7
|
// package.json
|
|
8
|
-
var version = "1.
|
|
8
|
+
var version = "1.1.1";
|
|
9
9
|
|
|
10
10
|
// src/cli.ts
|
|
11
11
|
var program = new Command();
|
|
@@ -13,7 +13,7 @@ program.name("confjs").description("Configure your frontend stack, instantly").v
|
|
|
13
13
|
program.command("react").description("Configure a React project").option("-y, --yes", "Accept all defaults").option("-d, --dry-run", "Simulate without writing to disk").option("-s, --silent", "Non-interactive mode").option("--debug", "Enable debug logs").option("-c, --config <file>", "Use configuration file").option("-f, --force", "Force installation (overwrite configs)").option("--no-install", "Generate configs only, skip package installation").action(
|
|
14
14
|
async (options) => {
|
|
15
15
|
try {
|
|
16
|
-
const { installReact } = await import("./install-
|
|
16
|
+
const { installReact } = await import("./install-UTFQ545S.js");
|
|
17
17
|
await installReact(options);
|
|
18
18
|
} catch (error) {
|
|
19
19
|
console.error("Error:", error);
|
|
@@ -23,7 +23,7 @@ program.command("react").description("Configure a React project").option("-y, --
|
|
|
23
23
|
);
|
|
24
24
|
program.command("list").description("List available libraries").option("-c, --category <category>", "Filter by category").action(async (options) => {
|
|
25
25
|
try {
|
|
26
|
-
const { listLibraries } = await import("./list-
|
|
26
|
+
const { listLibraries } = await import("./list-NW6ENYK6.js");
|
|
27
27
|
listLibraries(options);
|
|
28
28
|
} catch (error) {
|
|
29
29
|
console.error("Error:", error);
|
|
@@ -32,7 +32,7 @@ program.command("list").description("List available libraries").option("-c, --ca
|
|
|
32
32
|
});
|
|
33
33
|
program.command("check").description("Check compatibility without installing").option("-c, --config <file>", "Configuration file to check").action(async (options) => {
|
|
34
34
|
try {
|
|
35
|
-
const { checkCompatibility } = await import("./check-
|
|
35
|
+
const { checkCompatibility } = await import("./check-7PYMMMZK.js");
|
|
36
36
|
await checkCompatibility(options);
|
|
37
37
|
} catch (error) {
|
|
38
38
|
console.error("Error:", error);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
ConfigWriter,
|
|
8
8
|
getPluginsByCategory,
|
|
9
9
|
pluginRegistry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OJGTPK6N.js";
|
|
11
11
|
import {
|
|
12
12
|
PluginTracker,
|
|
13
13
|
detectContext
|
|
@@ -382,13 +382,41 @@ var Installer = class {
|
|
|
382
382
|
logger.info(`Starting installation of ${plugins.length} plugin(s)`);
|
|
383
383
|
try {
|
|
384
384
|
await this.tracker.load();
|
|
385
|
-
const
|
|
386
|
-
const
|
|
385
|
+
const notInstalledPromises = plugins.map(async (p) => {
|
|
386
|
+
const isTracked = this.tracker.isInstalled(p.name);
|
|
387
|
+
const isDetected = p.detect ? await p.detect(this.ctx) : false;
|
|
388
|
+
const isInstalled = isTracked || isDetected;
|
|
387
389
|
if (isInstalled) {
|
|
388
390
|
logger.info(`${p.displayName} is already installed, skipping...`);
|
|
391
|
+
if (isDetected && !isTracked) {
|
|
392
|
+
logger.debug(
|
|
393
|
+
`${p.displayName} detected but not tracked, adding to tracker...`
|
|
394
|
+
);
|
|
395
|
+
try {
|
|
396
|
+
await this.tracker.addPlugin({
|
|
397
|
+
name: p.name,
|
|
398
|
+
displayName: p.displayName,
|
|
399
|
+
category: p.category,
|
|
400
|
+
version: p.version,
|
|
401
|
+
packages: {
|
|
402
|
+
dependencies: [],
|
|
403
|
+
devDependencies: []
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
} catch (error) {
|
|
407
|
+
logger.warn(
|
|
408
|
+
`Failed to add ${p.displayName} to tracker: ${error instanceof Error ? error.message : String(error)}`
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
return null;
|
|
389
413
|
}
|
|
390
|
-
return
|
|
414
|
+
return p;
|
|
391
415
|
});
|
|
416
|
+
const notInstalledResults = await Promise.all(notInstalledPromises);
|
|
417
|
+
const notInstalled = notInstalledResults.filter(
|
|
418
|
+
(p) => p !== null
|
|
419
|
+
);
|
|
392
420
|
if (notInstalled.length === 0) {
|
|
393
421
|
logger.info("All plugins are already installed");
|
|
394
422
|
return {
|