ccg-workflow 1.4.3 → 1.4.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.
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import ansis from 'ansis';
|
|
4
|
-
import { y as diagnoseMcpConfig, z as isWindows, A as readClaudeCodeConfig, B as fixWindowsMcpConfig, C as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, a as i18n } from './shared/ccg-workflow.
|
|
4
|
+
import { y as diagnoseMcpConfig, z as isWindows, A as readClaudeCodeConfig, B as fixWindowsMcpConfig, C as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, a as i18n } from './shared/ccg-workflow.BYScBcmv.mjs';
|
|
5
5
|
import 'inquirer';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'pathe';
|
|
@@ -13,7 +13,7 @@ import 'smol-toml';
|
|
|
13
13
|
import 'node:child_process';
|
|
14
14
|
import 'node:util';
|
|
15
15
|
|
|
16
|
-
const version = "1.4.
|
|
16
|
+
const version = "1.4.4";
|
|
17
17
|
|
|
18
18
|
async function diagnoseMcp() {
|
|
19
19
|
console.log();
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as changeLanguage, v as checkForUpdates, x as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, q as getCurrentVersion, t as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, k as installWorkflows, o as migrateToV1_4_0, p as needsMigration, r as readCcgConfig, s as showMainMenu, n as uninstallAceTool, m as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.
|
|
1
|
+
export { c as changeLanguage, v as checkForUpdates, x as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, q as getCurrentVersion, t as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, k as installWorkflows, o as migrateToV1_4_0, p as needsMigration, r as readCcgConfig, s as showMainMenu, n as uninstallAceTool, m as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.BYScBcmv.mjs';
|
|
2
2
|
import 'ansis';
|
|
3
3
|
import 'inquirer';
|
|
4
4
|
import 'node:os';
|
|
@@ -780,6 +780,13 @@ function getWorkflowConfigs() {
|
|
|
780
780
|
function getWorkflowById(id) {
|
|
781
781
|
return WORKFLOW_CONFIGS.find((w) => w.id === id);
|
|
782
782
|
}
|
|
783
|
+
function replaceHomePathsInTemplate(content, installDir) {
|
|
784
|
+
const userHome = homedir();
|
|
785
|
+
const ccgDir = join(installDir, ".ccg");
|
|
786
|
+
let processed = content.replace(/~\/\.claude\/\.ccg/g, ccgDir);
|
|
787
|
+
processed = processed.replace(/~\//g, `${userHome}/`);
|
|
788
|
+
return processed;
|
|
789
|
+
}
|
|
783
790
|
async function installWorkflows(workflowIds, installDir, force = false) {
|
|
784
791
|
const result = {
|
|
785
792
|
success: true,
|
|
@@ -807,7 +814,9 @@ async function installWorkflows(workflowIds, installDir, force = false) {
|
|
|
807
814
|
try {
|
|
808
815
|
if (await fs.pathExists(srcFile)) {
|
|
809
816
|
if (force || !await fs.pathExists(destFile)) {
|
|
810
|
-
await fs.
|
|
817
|
+
const templateContent = await fs.readFile(srcFile, "utf-8");
|
|
818
|
+
const processedContent = replaceHomePathsInTemplate(templateContent, installDir);
|
|
819
|
+
await fs.writeFile(destFile, processedContent, "utf-8");
|
|
811
820
|
result.installedCommands.push(cmd);
|
|
812
821
|
}
|
|
813
822
|
} else {
|
|
@@ -834,7 +843,9 @@ ${workflow.description}
|
|
|
834
843
|
const sharedConfigDestFile = join(ccgConfigDir, "shared-config.md");
|
|
835
844
|
if (await fs.pathExists(sharedConfigSrcFile)) {
|
|
836
845
|
if (force || !await fs.pathExists(sharedConfigDestFile)) {
|
|
837
|
-
await fs.
|
|
846
|
+
const templateContent = await fs.readFile(sharedConfigSrcFile, "utf-8");
|
|
847
|
+
const processedContent = replaceHomePathsInTemplate(templateContent, installDir);
|
|
848
|
+
await fs.writeFile(sharedConfigDestFile, processedContent, "utf-8");
|
|
838
849
|
}
|
|
839
850
|
}
|
|
840
851
|
const agentsSrcDir = join(templateDir, "commands", "agents");
|
|
@@ -848,7 +859,9 @@ ${workflow.description}
|
|
|
848
859
|
const srcFile = join(agentsSrcDir, file);
|
|
849
860
|
const destFile = join(agentsDestDir, file);
|
|
850
861
|
if (force || !await fs.pathExists(destFile)) {
|
|
851
|
-
await fs.
|
|
862
|
+
const templateContent = await fs.readFile(srcFile, "utf-8");
|
|
863
|
+
const processedContent = replaceHomePathsInTemplate(templateContent, installDir);
|
|
864
|
+
await fs.writeFile(destFile, processedContent, "utf-8");
|
|
852
865
|
}
|
|
853
866
|
}
|
|
854
867
|
}
|
|
@@ -872,7 +885,9 @@ ${workflow.description}
|
|
|
872
885
|
const srcFile = join(srcModelDir, file);
|
|
873
886
|
const destFile = join(destModelDir, file);
|
|
874
887
|
if (force || !await fs.pathExists(destFile)) {
|
|
875
|
-
await fs.
|
|
888
|
+
const templateContent = await fs.readFile(srcFile, "utf-8");
|
|
889
|
+
const processedContent = replaceHomePathsInTemplate(templateContent, installDir);
|
|
890
|
+
await fs.writeFile(destFile, processedContent, "utf-8");
|
|
876
891
|
result.installedPrompts.push(`${model}/${file.replace(".md", "")}`);
|
|
877
892
|
}
|
|
878
893
|
}
|