@cregis-dev/cckit 0.6.8 → 0.6.10
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cregis-dev/cckit",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"description": "Enterprise-grade Claude Code configuration toolkit — orchestrates external tools to set up unified rules, skills, MCP and methodology for teams",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/commands/init.js
CHANGED
|
@@ -26,8 +26,6 @@ const SCAFFOLD_DIRS = [
|
|
|
26
26
|
'docs'
|
|
27
27
|
]
|
|
28
28
|
|
|
29
|
-
const VERSION = '0.5.0'
|
|
30
|
-
|
|
31
29
|
/**
|
|
32
30
|
* Run the init command.
|
|
33
31
|
*
|
|
@@ -65,6 +63,9 @@ export async function runInit(opts = {}, _deps = {}) {
|
|
|
65
63
|
const userSettings = registry.userSettings || {}
|
|
66
64
|
const modelId = resolveModelId(userSettings, config.model)
|
|
67
65
|
|
|
66
|
+
// Determine if user explicitly requested user-level config changes
|
|
67
|
+
const hasUserConfigFlags = Boolean(config.apiKey || config.apiUrl || config.model || config.forceApiKey)
|
|
68
|
+
|
|
68
69
|
// Build step list
|
|
69
70
|
const steps = [
|
|
70
71
|
{
|
|
@@ -78,7 +79,7 @@ export async function runInit(opts = {}, _deps = {}) {
|
|
|
78
79
|
modelId, // Resolved ID (e.g. 'Kimi-K2.5'), used for env vars
|
|
79
80
|
modelEnvKeys: userSettings.modelEnvKeys || [],
|
|
80
81
|
yes: opts.yes,
|
|
81
|
-
skip:
|
|
82
|
+
skip: !hasUserConfigFlags && opts.yes, // Skip in --yes mode unless explicit flags provided
|
|
82
83
|
},
|
|
83
84
|
},
|
|
84
85
|
{
|
package/src/commands/update.js
CHANGED
|
@@ -111,6 +111,8 @@ export async function runUpdate(opts = {}, _deps = {}) {
|
|
|
111
111
|
const userSettings = registry.userSettings || {}
|
|
112
112
|
const modelId = resolveModelId(userSettings, opts.model || config.model)
|
|
113
113
|
|
|
114
|
+
const hasUserConfigFlags = Boolean(opts.apiKey || opts.apiUrl || opts.model || opts.forceApiKey)
|
|
115
|
+
|
|
114
116
|
const stepSpecs = [
|
|
115
117
|
{
|
|
116
118
|
id: 'configure-user',
|
|
@@ -122,7 +124,7 @@ export async function runUpdate(opts = {}, _deps = {}) {
|
|
|
122
124
|
modelId,
|
|
123
125
|
modelEnvKeys: userSettings.modelEnvKeys || [],
|
|
124
126
|
yes: true, // update mode is non-interactive by default
|
|
125
|
-
skip:
|
|
127
|
+
skip: !hasUserConfigFlags, // Skip unless explicit flags provided
|
|
126
128
|
},
|
|
127
129
|
},
|
|
128
130
|
{
|
package/src/steps/add-plugin.js
CHANGED
|
@@ -16,12 +16,14 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Check if the `claude` CLI is available on PATH.
|
|
19
|
+
* Uses `claude --version` for cross-platform compatibility
|
|
20
|
+
* (works in cmd, PowerShell, Git Bash, and POSIX shells).
|
|
19
21
|
*
|
|
20
22
|
* @returns {boolean}
|
|
21
23
|
*/
|
|
22
24
|
function isClaudeCliAvailable() {
|
|
23
25
|
try {
|
|
24
|
-
execSync('
|
|
26
|
+
execSync('claude --version', { stdio: 'pipe', timeout: 5000 })
|
|
25
27
|
return true
|
|
26
28
|
} catch {
|
|
27
29
|
return false
|