ccjk 12.0.2 → 12.0.3

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.
@@ -8,7 +8,7 @@ import 'node:fs';
8
8
  import 'node:process';
9
9
  import 'node:url';
10
10
  import '../shared/ccjk.bQ7Dh1g4.mjs';
11
- import './package.mjs';
11
+ import '../shared/ccjk.DSpGBMwx.mjs';
12
12
  import './index3.mjs';
13
13
  import 'node:readline';
14
14
  import 'stream';
@@ -1,6 +1,6 @@
1
1
  import a from './index2.mjs';
2
- import { homepage, version } from './package.mjs';
3
2
  import { ensureI18nInitialized, i18n } from './index5.mjs';
3
+ import { a as getRuntimeHomepage, g as getRuntimeVersion } from '../shared/ccjk.DSpGBMwx.mjs';
4
4
  import '../shared/ccjk.BAGoDD49.mjs';
5
5
  import 'node:fs';
6
6
  import 'node:process';
@@ -107,6 +107,7 @@ function padToDisplayWidth(str, targetWidth) {
107
107
  }
108
108
  function displayBanner(subtitle) {
109
109
  ensureI18nInitialized();
110
+ const version = getRuntimeVersion();
110
111
  const defaultSubtitle = i18n.t("cli:banner.subtitle");
111
112
  const subtitleText = subtitle || defaultSubtitle;
112
113
  const paddedSubtitle = padToDisplayWidth(subtitleText, 28);
@@ -126,6 +127,7 @@ function displayBanner(subtitle) {
126
127
  );
127
128
  }
128
129
  function displayBannerWithInfo(subtitle) {
130
+ const homepage = getRuntimeHomepage();
129
131
  displayBanner(subtitle);
130
132
  console.log(a.gray(` ${a.green("ccjk")} - Advanced AI Development Assistant`));
131
133
  console.log(a.gray(` ${a.green(homepage)}
@@ -3,12 +3,12 @@ import { h as handleExitPromptError, a as handleGeneralError } from '../shared/c
3
3
  import { s as showCcrMenu, a as showMainMenu } from './menu.mjs';
4
4
  import './index2.mjs';
5
5
  import '../shared/ccjk.BAGoDD49.mjs';
6
- import './package.mjs';
7
6
  import './index5.mjs';
8
7
  import 'node:fs';
9
8
  import 'node:process';
10
9
  import 'node:url';
11
10
  import '../shared/ccjk.bQ7Dh1g4.mjs';
11
+ import '../shared/ccjk.DSpGBMwx.mjs';
12
12
  import './index3.mjs';
13
13
  import 'node:readline';
14
14
  import 'stream';
@@ -47,7 +47,7 @@ import './claude-config.mjs';
47
47
  import '../shared/ccjk.BiCrMV5O.mjs';
48
48
  import '../shared/ccjk.BFQ7yr5S.mjs';
49
49
  import './prompts.mjs';
50
- import './package.mjs';
50
+ import '../shared/ccjk.DSpGBMwx.mjs';
51
51
 
52
52
  class ToolUpdateScheduler {
53
53
  /**
@@ -43,7 +43,7 @@ import './claude-config.mjs';
43
43
  import './platform.mjs';
44
44
  import '../shared/ccjk.BiCrMV5O.mjs';
45
45
  import './prompts.mjs';
46
- import './package.mjs';
46
+ import '../shared/ccjk.DSpGBMwx.mjs';
47
47
 
48
48
  async function configureIncrementalManagement() {
49
49
  ensureI18nInitialized();
@@ -41,7 +41,7 @@ import './platform.mjs';
41
41
  import '../shared/ccjk.BiCrMV5O.mjs';
42
42
  import '../shared/ccjk.BFQ7yr5S.mjs';
43
43
  import './prompts.mjs';
44
- import './package.mjs';
44
+ import '../shared/ccjk.DSpGBMwx.mjs';
45
45
  import '../shared/ccjk.DOwtZMk8.mjs';
46
46
 
47
47
  async function addProviderToExisting(provider, apiKey, allowOverwrite = false) {
@@ -9,7 +9,7 @@ import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
9
9
  import '../shared/ccjk.BAGoDD49.mjs';
10
10
  import './index5.mjs';
11
11
  import 'node:url';
12
- import './package.mjs';
12
+ import '../shared/ccjk.DSpGBMwx.mjs';
13
13
 
14
14
  const CONFIG_LOCATIONS = [
15
15
  { path: SETTINGS_FILE, type: "global" },
@@ -43,7 +43,7 @@ import '../shared/ccjk.BiCrMV5O.mjs';
43
43
  import './index7.mjs';
44
44
  import '../shared/ccjk.CxpGa6MC.mjs';
45
45
  import './prompts.mjs';
46
- import './package.mjs';
46
+ import '../shared/ccjk.DSpGBMwx.mjs';
47
47
  import '../shared/ccjk.DOwtZMk8.mjs';
48
48
 
49
49
  async function configSwitchCommand(options) {
@@ -32,7 +32,7 @@ import 'node:url';
32
32
  import 'module';
33
33
  import 'node:child_process';
34
34
  import 'node:stream';
35
- import './package.mjs';
35
+ import '../shared/ccjk.DSpGBMwx.mjs';
36
36
  import 'node:fs/promises';
37
37
 
38
38
  const t = i18n.t.bind(i18n);
@@ -44,7 +44,7 @@ import './fs-operations.mjs';
44
44
  import 'node:fs/promises';
45
45
  import './json-config.mjs';
46
46
  import './prompts.mjs';
47
- import './package.mjs';
47
+ import '../shared/ccjk.DSpGBMwx.mjs';
48
48
  import './index6.mjs';
49
49
  import './banner.mjs';
50
50
  import './auto-updater.mjs';
@@ -2,7 +2,6 @@ import { existsSync } from 'node:fs';
2
2
  import process__default from 'node:process';
3
3
  import a from './index2.mjs';
4
4
  import { i as inquirer } from './index3.mjs';
5
- import { version } from './package.mjs';
6
5
  import { m as runCodexFullInit, d as selectMcpServices, g as getMcpServices, M as MCP_SERVICE_CONFIGS } from './codex.mjs';
7
6
  import { a as modifyApiConfigPartially, b as configureApiCompletely, n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, s as selectAndInstallWorkflows, c as configureOutputStyle, f as formatApiKeyDisplay, W as WORKFLOW_CONFIG_BASE } from '../shared/ccjk.BnpWvs9V.mjs';
8
7
  import { SETTINGS_FILE, DEFAULT_CODE_TOOL_TYPE, CODE_TOOL_BANNERS, API_DEFAULT_URL } from './constants.mjs';
@@ -26,6 +25,7 @@ import { resolveAiOutputLanguage } from './prompts.mjs';
26
25
  import { c as checkSuperpowersInstalled, i as installSuperpowers } from '../shared/ccjk._dESH4Rk.mjs';
27
26
  import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
28
27
  import { checkClaudeCodeVersionAndPrompt } from './version-checker.mjs';
28
+ import { g as getRuntimeVersion } from '../shared/ccjk.DSpGBMwx.mjs';
29
29
 
30
30
  const execAsync$1 = promisify(exec);
31
31
  async function isCcrInstalled() {
@@ -321,6 +321,7 @@ class ProgressTracker {
321
321
  }
322
322
  }
323
323
 
324
+ const ccjkVersion = getRuntimeVersion();
324
325
  async function validateSkipPromptOptions(options) {
325
326
  if (options.allLang) {
326
327
  if (options.allLang === "zh-CN" || options.allLang === "en") {
@@ -734,7 +735,7 @@ async function init(options = {}) {
734
735
  workflows: selectedWorkflows
735
736
  });
736
737
  updateZcfConfig({
737
- version,
738
+ version: ccjkVersion,
738
739
  preferredLang: i18n.language,
739
740
  // CCJK界面语言
740
741
  templateLang: configLang,
@@ -1115,7 +1116,7 @@ async function init(options = {}) {
1115
1116
  }
1116
1117
  if (!options.skipPrompt && !options.skipBanner) tracker.nextStep("Finalizing setup");
1117
1118
  updateZcfConfig({
1118
- version,
1119
+ version: ccjkVersion,
1119
1120
  preferredLang: i18n.language,
1120
1121
  // CCJK界面语言
1121
1122
  templateLang: configLang,
@@ -42,7 +42,7 @@ import '../shared/ccjk.BiCrMV5O.mjs';
42
42
  import './platform.mjs';
43
43
  import '../shared/ccjk.BFQ7yr5S.mjs';
44
44
  import './prompts.mjs';
45
- import './package.mjs';
45
+ import '../shared/ccjk.DSpGBMwx.mjs';
46
46
  import '../shared/ccjk.DOwtZMk8.mjs';
47
47
 
48
48
  async function mcpInstallCli(options) {
@@ -43,7 +43,7 @@ import './config.mjs';
43
43
  import '../shared/ccjk.BiCrMV5O.mjs';
44
44
  import '../shared/ccjk.BFQ7yr5S.mjs';
45
45
  import './prompts.mjs';
46
- import './package.mjs';
46
+ import '../shared/ccjk.DSpGBMwx.mjs';
47
47
  import '../shared/ccjk.DOwtZMk8.mjs';
48
48
 
49
49
  function getReleasableServices(configuredServices, tier) {
@@ -7,7 +7,7 @@ import '../shared/ccjk.BAGoDD49.mjs';
7
7
  import 'node:fs';
8
8
  import 'node:url';
9
9
  import '../shared/ccjk.bQ7Dh1g4.mjs';
10
- import './package.mjs';
10
+ import '../shared/ccjk.DSpGBMwx.mjs';
11
11
  import 'node:crypto';
12
12
 
13
13
  const DEFAULT_STORAGE_CONFIG = {
@@ -26,7 +26,7 @@ import 'buffer';
26
26
  import 'string_decoder';
27
27
  import './index5.mjs';
28
28
  import 'node:url';
29
- import './package.mjs';
29
+ import '../shared/ccjk.DSpGBMwx.mjs';
30
30
  import 'node:fs/promises';
31
31
 
32
32
  const KNOWLEDGE_BASE_FILE = join(CCJK_CONFIG_DIR, "knowledge-base.json");
@@ -1,4 +1,3 @@
1
- const version = "12.0.1";
2
- const homepage = "https://github.com/miounet11/ccjk";
1
+ const version = "12.0.3";
3
2
 
4
- export { homepage, version };
3
+ export { version };
@@ -8,7 +8,7 @@ import 'node:os';
8
8
  import './index5.mjs';
9
9
  import 'node:process';
10
10
  import 'node:url';
11
- import './package.mjs';
11
+ import '../shared/ccjk.DSpGBMwx.mjs';
12
12
 
13
13
  const PERMISSION_CONFIG_FILE = join(CCJK_CONFIG_DIR, "permissions.json");
14
14
  const PERMISSION_TEMPLATES = [
@@ -1,11 +1,11 @@
1
1
  import process__default from 'node:process';
2
2
  import a from './index2.mjs';
3
3
  import { i as inquirer } from './index3.mjs';
4
- import { version } from './package.mjs';
5
4
  import { LANG_LABELS, getAiOutputLanguageLabel, SUPPORTED_LANGS, AI_OUTPUT_LANGUAGES } from './constants.mjs';
6
5
  import { ensureI18nInitialized, i18n } from './index5.mjs';
7
6
  import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
8
7
  import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
8
+ import { g as getRuntimeVersion } from '../shared/ccjk.DSpGBMwx.mjs';
9
9
  import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
10
10
  import '../shared/ccjk.BAGoDD49.mjs';
11
11
  import 'node:readline';
@@ -32,6 +32,7 @@ import 'node:fs/promises';
32
32
  import './json-config.mjs';
33
33
  import '../shared/ccjk.RyizuzOI.mjs';
34
34
 
35
+ const ccjkVersion = getRuntimeVersion();
35
36
  async function selectAiOutputLanguage(defaultLang) {
36
37
  ensureI18nInitialized();
37
38
  console.log(a.dim(`
@@ -99,7 +100,7 @@ async function selectScriptLanguage(currentLang) {
99
100
  }
100
101
  const scriptLang = lang;
101
102
  updateZcfConfig({
102
- version,
103
+ version: ccjkVersion,
103
104
  preferredLang: scriptLang
104
105
  });
105
106
  return scriptLang;
@@ -1,9 +1,9 @@
1
1
  import a from './index2.mjs';
2
2
  import { i as inquirer } from './index3.mjs';
3
- import { version } from './package.mjs';
4
3
  import { detectSmartDefaults } from './smart-defaults.mjs';
5
4
  import { i18n } from './index5.mjs';
6
5
  import { updateZcfConfig } from './ccjk-config.mjs';
6
+ import { g as getRuntimeVersion } from '../shared/ccjk.DSpGBMwx.mjs';
7
7
  import { i as init } from './init.mjs';
8
8
  import '../shared/ccjk.BAGoDD49.mjs';
9
9
  import 'node:readline';
@@ -56,10 +56,11 @@ import '../shared/ccjk.BIxuVL3_.mjs';
56
56
  import './installer.mjs';
57
57
  import '../shared/ccjk._dESH4Rk.mjs';
58
58
 
59
+ const ccjkVersion = getRuntimeVersion();
59
60
  function displayHeader() {
60
61
  console.log("");
61
62
  console.log(a.bold.green("\u26A1 CCJK Quick Setup"));
62
- console.log(a.gray(` v${version} \u2022 One-click configuration`));
63
+ console.log(a.gray(` v${ccjkVersion} \u2022 One-click configuration`));
63
64
  console.log(a.gray(` ${"\u2500".repeat(50)}`));
64
65
  console.log("");
65
66
  }
@@ -361,7 +362,7 @@ async function quickSetup(options = {}) {
361
362
  !hasApiKey
362
363
  );
363
364
  updateZcfConfig({
364
- version,
365
+ version: ccjkVersion,
365
366
  preferredLang: lang,
366
367
  templateLang: lang,
367
368
  aiOutputLang: lang,
@@ -1,7 +1,6 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import a from './index2.mjs';
3
3
  import { i as inquirer } from './index3.mjs';
4
- import { version } from './package.mjs';
5
4
  import { SETTINGS_FILE, DEFAULT_CODE_TOOL_TYPE, resolveCodeToolType as resolveCodeToolType$1, isCodeToolType } from './constants.mjs';
6
5
  import { r as runCodexUpdate, M as MCP_SERVICE_CONFIGS, g as getMcpServices } from './codex.mjs';
7
6
  import { i18n } from './index5.mjs';
@@ -13,6 +12,7 @@ import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displa
13
12
  import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
14
13
  import { a as installMcpServices } from '../shared/ccjk.waa2ikKJ.mjs';
15
14
  import { resolveAiOutputLanguage } from './prompts.mjs';
15
+ import { g as getRuntimeVersion } from '../shared/ccjk.DSpGBMwx.mjs';
16
16
  import { checkClaudeCodeVersionAndPrompt } from './version-checker.mjs';
17
17
  import '../shared/ccjk.BAGoDD49.mjs';
18
18
  import 'node:readline';
@@ -49,6 +49,7 @@ import '../shared/ccjk.DOwtZMk8.mjs';
49
49
  import './index6.mjs';
50
50
  import '../shared/ccjk.BiCrMV5O.mjs';
51
51
 
52
+ const ccjkVersion = getRuntimeVersion();
52
53
  function resolveCodeToolType(optionValue, savedValue) {
53
54
  if (optionValue !== void 0) {
54
55
  const resolved = resolveCodeToolType$1(optionValue);
@@ -106,13 +107,13 @@ async function update(options = {}) {
106
107
  const newPreferredLang = options.configLang || zcfConfig?.preferredLang;
107
108
  if (newPreferredLang) {
108
109
  updateZcfConfig({
109
- version,
110
+ version: ccjkVersion,
110
111
  preferredLang: newPreferredLang,
111
112
  codeToolType
112
113
  });
113
114
  } else {
114
115
  updateZcfConfig({
115
- version,
116
+ version: ccjkVersion,
116
117
  codeToolType
117
118
  });
118
119
  }
@@ -150,7 +151,7 @@ ${i18n.t("configuration:updatingPrompts")}
150
151
  await checkAndPromptNewMcpServices(options.skipPrompt);
151
152
  await checkClaudeCodeVersionAndPrompt(false);
152
153
  updateZcfConfig({
153
- version,
154
+ version: ccjkVersion,
154
155
  templateLang: configLang,
155
156
  // 保存模板语言选择
156
157
  aiOutputLang,
@@ -3,8 +3,8 @@ import a from './index2.mjs';
3
3
  import ora from './index7.mjs';
4
4
  import { s as semverExports } from '../shared/ccjk.CxpGa6MC.mjs';
5
5
  import { exec as q } from './main.mjs';
6
- import { version } from './package.mjs';
7
6
  import { STATUS } from './banner.mjs';
7
+ import { g as getRuntimeVersion } from '../shared/ccjk.DSpGBMwx.mjs';
8
8
  import '../shared/ccjk.BAGoDD49.mjs';
9
9
  import 'node:util';
10
10
  import '../shared/ccjk.Cjgrln_h.mjs';
@@ -18,6 +18,7 @@ import 'node:fs';
18
18
  import 'node:url';
19
19
  import '../shared/ccjk.bQ7Dh1g4.mjs';
20
20
 
21
+ const currentVersion = getRuntimeVersion();
21
22
  async function checkClaudeCodeVersion() {
22
23
  try {
23
24
  const result = await q("claude", ["--version"], { throwOnError: false });
@@ -42,17 +43,17 @@ async function checkClaudeCodeVersion() {
42
43
  async function checkCcjkVersion() {
43
44
  try {
44
45
  const npmResult = await q("npm", ["view", "ccjk", "version"], { throwOnError: false });
45
- const latest = npmResult.stdout.trim() || version;
46
+ const latest = npmResult.stdout.trim() || currentVersion;
46
47
  return {
47
- current: version,
48
+ current: currentVersion,
48
49
  latest,
49
- updateAvailable: semverExports.lt(version, latest),
50
+ updateAvailable: semverExports.lt(currentVersion, latest),
50
51
  releaseUrl: "https://github.com/ccjk/ccjk/releases"
51
52
  };
52
53
  } catch {
53
54
  return {
54
- current: version,
55
- latest: version,
55
+ current: currentVersion,
56
+ latest: currentVersion,
56
57
  updateAvailable: false
57
58
  };
58
59
  }
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { homedir } from 'node:os';
5
5
  import * as path from 'node:path';
6
6
  import { promisify } from 'node:util';
7
7
  import a from './chunks/index2.mjs';
8
- import { version } from './chunks/package.mjs';
8
+ import { g as getRuntimeVersion } from './shared/ccjk.DSpGBMwx.mjs';
9
9
  import { j as join$1 } from './shared/ccjk.bQ7Dh1g4.mjs';
10
10
  export { j as config } from './chunks/config.mjs';
11
11
  export { e as extractDisplayName, a as extractString, i as i18nHelpers, n as normalizeRecommendation, b as normalizeRecommendations } from './shared/ccjk.AqnXPAzw.mjs';
@@ -15,12 +15,12 @@ import { Transform } from 'node:stream';
15
15
  import { pipeline } from 'node:stream/promises';
16
16
  import './shared/ccjk.BAGoDD49.mjs';
17
17
  import 'node:url';
18
+ import 'node:process';
18
19
  import './shared/ccjk.RyizuzOI.mjs';
19
20
  import './chunks/index3.mjs';
20
21
  import 'node:readline';
21
22
  import 'stream';
22
23
  import 'node:tty';
23
- import 'node:process';
24
24
  import 'node:async_hooks';
25
25
  import './shared/ccjk.Cjgrln_h.mjs';
26
26
  import 'tty';
@@ -1600,7 +1600,7 @@ function leftText(text, width) {
1600
1600
  return `${BOX_CHARS.vertical} ${text}${" ".repeat(padding - 1)}${BOX_CHARS.vertical}`;
1601
1601
  }
1602
1602
  function getVersion() {
1603
- return version;
1603
+ return getRuntimeVersion();
1604
1604
  }
1605
1605
  function generateWelcome(scanResult, options = {}) {
1606
1606
  const {
@@ -0,0 +1,38 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+ import { fileURLToPath } from 'node:url';
3
+ import process__default from 'node:process';
4
+ import { d as dirname, j as join } from './ccjk.bQ7Dh1g4.mjs';
5
+
6
+ let cachedMetadata = null;
7
+ function readRuntimePackageMetadata() {
8
+ if (cachedMetadata) {
9
+ return cachedMetadata;
10
+ }
11
+ const currentDir = dirname(fileURLToPath(import.meta.url));
12
+ const candidatePaths = [
13
+ join(currentDir, "../../package.json"),
14
+ join(currentDir, "../package.json"),
15
+ join(process__default.cwd(), "package.json")
16
+ ];
17
+ for (const packagePath of candidatePaths) {
18
+ if (!existsSync(packagePath)) {
19
+ continue;
20
+ }
21
+ try {
22
+ const parsed = JSON.parse(readFileSync(packagePath, "utf-8"));
23
+ cachedMetadata = parsed;
24
+ return parsed;
25
+ } catch {
26
+ }
27
+ }
28
+ cachedMetadata = {};
29
+ return cachedMetadata;
30
+ }
31
+ function getRuntimeVersion() {
32
+ return readRuntimePackageMetadata().version || "0.0.0";
33
+ }
34
+ function getRuntimeHomepage() {
35
+ return readRuntimePackageMetadata().homepage || "https://github.com/miounet11/ccjk";
36
+ }
37
+
38
+ export { getRuntimeHomepage as a, getRuntimeVersion as g };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ccjk",
3
3
  "type": "module",
4
- "version": "12.0.2",
4
+ "version": "12.0.3",
5
5
  "packageManager": "pnpm@10.17.1",
6
6
  "description": "CLI toolkit for Claude Code and Codex setup. Simplifies MCP service installation, API configuration, workflow management, and multi-provider support with guided interactive setup.",
7
7
  "author": {