ccjk 8.0.3 → 8.0.4

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.
@@ -1,10 +1,10 @@
1
1
  import consola from 'consola';
2
2
  import process__default, { cwd } from 'node:process';
3
- import { P as ProjectAnalyzer } from '../shared/ccjk.C5uxT25l.mjs';
3
+ import { P as ProjectAnalyzer } from '../shared/ccjk.CsujU3aC.mjs';
4
4
  import { join } from 'pathe';
5
5
  import { existsSync, readdirSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
6
6
  import { homedir } from 'node:os';
7
- import { c as createCloudClient } from '../shared/ccjk.C9VnlgKb.mjs';
7
+ import { c as createCloudClient } from '../shared/ccjk.B1ziEZjo.mjs';
8
8
  import { i18n } from './index.mjs';
9
9
  import 'fs-extra';
10
10
  import 'fs';
@@ -8,7 +8,7 @@ import { c as createCompleteCloudClient, a as ccjkSkills } from './ccjk-skills.m
8
8
  import { ccjkMcp } from './ccjk-mcp.mjs';
9
9
  import { ccjkAgents } from './ccjk-agents.mjs';
10
10
  import { ccjkHooks } from './ccjk-hooks.mjs';
11
- import { a as analyzeProject } from '../shared/ccjk.C5uxT25l.mjs';
11
+ import { a as analyzeProject } from '../shared/ccjk.CsujU3aC.mjs';
12
12
  import 'node:process';
13
13
  import 'node:url';
14
14
  import 'i18next';
@@ -16,7 +16,7 @@ import 'i18next-fs-backend';
16
16
  import 'pathe';
17
17
  import 'node:os';
18
18
  import 'inquirer';
19
- import '../shared/ccjk.C9VnlgKb.mjs';
19
+ import '../shared/ccjk.B1ziEZjo.mjs';
20
20
  import 'ofetch';
21
21
  import 'ohash';
22
22
  import '../shared/ccjk.Bdhyg3X-.mjs';
@@ -1,5 +1,5 @@
1
1
  import { consola } from 'consola';
2
- import { P as ProjectAnalyzer } from '../shared/ccjk.C5uxT25l.mjs';
2
+ import { P as ProjectAnalyzer } from '../shared/ccjk.CsujU3aC.mjs';
3
3
  import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'node:fs';
4
4
  import process__default from 'node:process';
5
5
  import { join, dirname } from 'pathe';
@@ -4,7 +4,7 @@ import { join } from 'node:path';
4
4
  import { cwd } from 'node:process';
5
5
  import ansis from 'ansis';
6
6
  import { ensureI18nInitialized, i18n } from './index.mjs';
7
- import { a as analyzeProject } from '../shared/ccjk.C5uxT25l.mjs';
7
+ import { a as analyzeProject } from '../shared/ccjk.CsujU3aC.mjs';
8
8
  import { b as backupMcpConfig, r as readMcpConfig, m as mergeMcpServers, w as writeMcpConfig } from './claude-config.mjs';
9
9
  import { e as commandExists } from './platform.mjs';
10
10
  import { CLAUDE_DIR } from './constants.mjs';
@@ -2,7 +2,7 @@ import { i18n } from './index.mjs';
2
2
  import { consola } from 'consola';
3
3
  import ansis from 'ansis';
4
4
  import { cwd } from 'node:process';
5
- import { P as ProjectAnalyzer } from '../shared/ccjk.C5uxT25l.mjs';
5
+ import { P as ProjectAnalyzer } from '../shared/ccjk.CsujU3aC.mjs';
6
6
  import { performance } from 'node:perf_hooks';
7
7
  import { promises } from 'node:fs';
8
8
  import { join } from 'pathe';
@@ -23,7 +23,7 @@ import 'smol-toml';
23
23
  import 'node:os';
24
24
  import 'node:path';
25
25
  import 'inquirer';
26
- import '../shared/ccjk.C9VnlgKb.mjs';
26
+ import '../shared/ccjk.B1ziEZjo.mjs';
27
27
  import 'ofetch';
28
28
  import 'ohash';
29
29
  import 'node:crypto';
@@ -5,8 +5,8 @@ import ansis from 'ansis';
5
5
  import consola from 'consola';
6
6
  import inquirer from 'inquirer';
7
7
  import { i18n } from './index.mjs';
8
- import { a as analyzeProject } from '../shared/ccjk.C5uxT25l.mjs';
9
- import { C as CloudClientError, c as createCloudClient } from '../shared/ccjk.C9VnlgKb.mjs';
8
+ import { a as analyzeProject } from '../shared/ccjk.CsujU3aC.mjs';
9
+ import { C as CloudClientError, c as createCloudClient } from '../shared/ccjk.B1ziEZjo.mjs';
10
10
  import { hash } from 'ohash';
11
11
  import { randomUUID } from 'node:crypto';
12
12
  import { g as getSkillParser } from '../shared/ccjk.Bdhyg3X-.mjs';
@@ -68,12 +68,12 @@ import './update.mjs';
68
68
  import './ccjk-all.mjs';
69
69
  import 'consola';
70
70
  import './ccjk-skills.mjs';
71
- import '../shared/ccjk.C5uxT25l.mjs';
71
+ import '../shared/ccjk.CsujU3aC.mjs';
72
72
  import 'fs';
73
73
  import 'path';
74
74
  import 'url';
75
75
  import 'module';
76
- import '../shared/ccjk.C9VnlgKb.mjs';
76
+ import '../shared/ccjk.B1ziEZjo.mjs';
77
77
  import 'ofetch';
78
78
  import 'ohash';
79
79
  import '../shared/ccjk.Bdhyg3X-.mjs';
@@ -1,4 +1,4 @@
1
- const version = "8.0.3";
1
+ const version = "8.0.4";
2
2
  const homepage = "https://github.com/miounet11/ccjk";
3
3
 
4
4
  export { homepage, version };
@@ -245,7 +245,7 @@ class CloudClient {
245
245
  }
246
246
  function createCloudClient(config) {
247
247
  return new CloudClient({
248
- baseURL: "https://api.claudehome.cn/v1",
248
+ baseURL: "https://api.claudehome.cn",
249
249
  timeout: 1e4,
250
250
  version: "8.0.0",
251
251
  enableCache: true,
@@ -4651,20 +4651,51 @@ async function detectProject(projectPath, config) {
4651
4651
  logger$2.info(`Detected project type: ${analysis.projectType}`);
4652
4652
  return analysis;
4653
4653
  }
4654
+ const ROOT_CONFIG_FILES = [
4655
+ "package.json",
4656
+ "tsconfig.json",
4657
+ "jsconfig.json",
4658
+ "go.mod",
4659
+ "Cargo.toml",
4660
+ "pyproject.toml",
4661
+ "requirements.txt",
4662
+ "setup.py",
4663
+ "Gemfile",
4664
+ "composer.json",
4665
+ "pom.xml",
4666
+ "build.gradle",
4667
+ "build.gradle.kts",
4668
+ "pubspec.yaml",
4669
+ "Package.swift",
4670
+ "pom.xml"
4671
+ ];
4654
4672
  async function scanProjectFiles(projectPath, config) {
4673
+ const rootConfigFiles = [];
4674
+ for (const configFile of ROOT_CONFIG_FILES) {
4675
+ const configPath = path$1.join(projectPath, configFile);
4676
+ if (await fs.pathExists(configPath)) {
4677
+ rootConfigFiles.push(configFile);
4678
+ logger$2.debug(`Found root config: ${configFile}`);
4679
+ }
4680
+ }
4655
4681
  const patterns = ["**/*"];
4656
4682
  const ignore = config.excludePatterns;
4657
4683
  if (!config.includeNodeModules) {
4658
4684
  ignore.push("node_modules/**");
4659
4685
  }
4660
- const files = await glob(patterns, {
4686
+ const allFiles = await glob(patterns, {
4661
4687
  cwd: projectPath,
4662
4688
  ignore,
4663
4689
  absolute: false
4664
4690
  });
4691
+ const fileSet = /* @__PURE__ */ new Set([...rootConfigFiles, ...allFiles]);
4692
+ const files = Array.from(fileSet);
4665
4693
  if (files.length > config.maxFilesToScan) {
4666
4694
  logger$2.warn(`Too many files (${files.length}), limiting to ${config.maxFilesToScan}`);
4667
- return files.slice(0, config.maxFilesToScan);
4695
+ const rootConfigs = files.filter((f) => ROOT_CONFIG_FILES.includes(f));
4696
+ const otherFiles = files.filter((f) => !ROOT_CONFIG_FILES.includes(f));
4697
+ const limitedOthers = otherFiles.slice(0, config.maxFilesToScan - rootConfigs.length);
4698
+ return [...rootConfigs, ...limitedOthers];
4668
4699
  }
4669
4700
  return files;
4670
4701
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ccjk",
3
3
  "type": "module",
4
- "version": "8.0.3",
4
+ "version": "8.0.4",
5
5
  "packageManager": "pnpm@10.17.1",
6
6
  "description": "Ultimate AI Development Tool - Code Tool Abstraction Layer with 83% Token Savings - Now with Cloud Sync, Hot-Reload Skills, Multi-Agent Orchestration, and Full Claude Code CLI 2.1+ Compatibility",
7
7
  "author": {