ccjk 13.3.23 → 13.5.0
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/chunks/auto-bootstrap.mjs +2 -2
- package/dist/chunks/auto-fix.mjs +52 -1
- package/dist/chunks/ccjk-agents.mjs +1 -1
- package/dist/chunks/ccjk-all.mjs +5 -5
- package/dist/chunks/ccjk-hooks.mjs +4 -3
- package/dist/chunks/ccjk-mcp.mjs +1 -1
- package/dist/chunks/ccjk-setup.mjs +3 -3
- package/dist/chunks/ccjk-skills.mjs +3 -2
- package/dist/chunks/ccr.mjs +1 -1
- package/dist/chunks/claude-code-config-manager.mjs +76 -25
- package/dist/chunks/claude-code-incremental-manager.mjs +7 -4
- package/dist/chunks/config2.mjs +33 -16
- package/dist/chunks/constants.mjs +2 -2
- package/dist/chunks/doctor.mjs +1 -1
- package/dist/chunks/init.mjs +2 -2
- package/dist/chunks/mcp.mjs +2 -2
- package/dist/chunks/menu-hierarchical.mjs +1 -1
- package/dist/chunks/notification.mjs +5 -5
- package/dist/chunks/onboarding-wizard.mjs +1 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/plugin.mjs +2 -2
- package/dist/chunks/quick-provider.mjs +6 -1
- package/dist/chunks/remote.mjs +2 -2
- package/dist/chunks/skills-sync.mjs +3 -3
- package/dist/chunks/slash-commands.mjs +1 -1
- package/dist/chunks/status.mjs +26 -0
- package/dist/index.d.mts +241 -60
- package/dist/index.d.ts +241 -60
- package/dist/index.mjs +15 -354
- package/dist/shared/{ccjk.eIn-g1yI.mjs → ccjk.BBizCO6_.mjs} +3 -2
- package/dist/shared/{ccjk.CLUL0pAV.mjs → ccjk.C3YuTovw.mjs} +177 -16
- package/dist/shared/{ccjk.BtB1e5jm.mjs → ccjk.D0g2ABGg.mjs} +3 -3
- package/dist/shared/{ccjk.DRfdq6yl.mjs → ccjk.DypYla6I.mjs} +2 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { P as ProjectAnalyzer, T as TemplatesClient, d as analyzeDependencies, a as analyzeProject, h as batchAnalyze, b as createTemplatesClient, e as detectProject, f as detectProjectType, g as getTemplatesClient } from './shared/ccjk.
|
|
2
|
-
import { a as createCloudClient } from './shared/ccjk.
|
|
3
|
-
export { C as CachedCloudClient, b as CloudCache, d as CloudClient, F as FallbackCloudClient, R as RetryableCloudClient, T as TelemetryReporter, c as createCompleteCloudClient, g as getTelemetry, i as initializeTelemetry, r as retryUtils, s as stopTelemetry, t as telemetryUtils, e as trackEvent, w as withRetry } from './shared/ccjk.
|
|
1
|
+
export { P as ProjectAnalyzer, T as TemplatesClient, d as analyzeDependencies, a as analyzeProject, h as batchAnalyze, b as createTemplatesClient, e as detectProject, f as detectProjectType, g as getTemplatesClient } from './shared/ccjk.DypYla6I.mjs';
|
|
2
|
+
import { a as createCloudClient } from './shared/ccjk.C3YuTovw.mjs';
|
|
3
|
+
export { C as CachedCloudClient, b as CloudCache, d as CloudClient, F as FallbackCloudClient, R as RetryableCloudClient, T as TelemetryReporter, c as createCompleteCloudClient, g as getTelemetry, i as initializeTelemetry, r as retryUtils, s as stopTelemetry, t as telemetryUtils, e as trackEvent, w as withRetry } from './shared/ccjk.C3YuTovw.mjs';
|
|
4
|
+
import { CLOUD_ENDPOINTS } from './chunks/constants.mjs';
|
|
4
5
|
export { C as CloudError, a as CloudErrorCode, b as CloudErrorFactory, f as formatErrorForLogging, g as getRetryDelay, h as handleCloudError, i as isAuthError, c as isRateLimitError, d as isRetryableError, e as isRetryableErrorCode } from './shared/ccjk.D8ZLYSZZ.mjs';
|
|
5
6
|
import { e as extractString } from './shared/ccjk.C2jHOZVP.mjs';
|
|
6
7
|
export { a as extractDisplayName, i as i18nHelpers, n as normalizeRecommendation, b as normalizeRecommendations } from './shared/ccjk.C2jHOZVP.mjs';
|
|
@@ -13,7 +14,7 @@ import { promisify } from 'node:util';
|
|
|
13
14
|
import a from './chunks/index2.mjs';
|
|
14
15
|
import { g as getRuntimeVersion } from './shared/ccjk.gDEDGD_t.mjs';
|
|
15
16
|
import { j as join$1 } from './shared/ccjk.bQ7Dh1g4.mjs';
|
|
16
|
-
export {
|
|
17
|
+
export { j as config } from './chunks/config2.mjs';
|
|
17
18
|
export { a as loggerUtils } from './shared/ccjk.BJMRY2Ra.mjs';
|
|
18
19
|
export { p as platform } from './chunks/platform.mjs';
|
|
19
20
|
import { Transform } from 'node:stream';
|
|
@@ -38,7 +39,6 @@ import 'fs';
|
|
|
38
39
|
import 'child_process';
|
|
39
40
|
import 'buffer';
|
|
40
41
|
import 'string_decoder';
|
|
41
|
-
import './chunks/constants.mjs';
|
|
42
42
|
import './chunks/claude-config.mjs';
|
|
43
43
|
import './chunks/json-config.mjs';
|
|
44
44
|
import './chunks/fs-operations.mjs';
|
|
@@ -47,342 +47,6 @@ import './shared/ccjk.DScm_NnL.mjs';
|
|
|
47
47
|
import './chunks/main.mjs';
|
|
48
48
|
import 'module';
|
|
49
49
|
|
|
50
|
-
async function getCloudRecommendedHooks(projectInfo, options = {}) {
|
|
51
|
-
const { includeCommunity = true, includePremium = false, limit = 10 } = options;
|
|
52
|
-
try {
|
|
53
|
-
const recommendations = await fetchCloudRecommendations(projectInfo, {
|
|
54
|
-
includeCommunity,
|
|
55
|
-
includePremium,
|
|
56
|
-
limit
|
|
57
|
-
});
|
|
58
|
-
return recommendations;
|
|
59
|
-
} catch (error) {
|
|
60
|
-
console.error("Failed to fetch cloud recommendations:", error);
|
|
61
|
-
return [];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
async function fetchCloudRecommendations(projectInfo, options) {
|
|
65
|
-
const recommendations = [];
|
|
66
|
-
const baseRecommendations = getBaseRecommendations(projectInfo);
|
|
67
|
-
recommendations.push(...baseRecommendations);
|
|
68
|
-
if (projectInfo.frameworks?.length > 0) {
|
|
69
|
-
const frameworkRecs = getFrameworkRecommendations(projectInfo);
|
|
70
|
-
recommendations.push(...frameworkRecs);
|
|
71
|
-
}
|
|
72
|
-
if (projectInfo.configFiles?.length > 0) {
|
|
73
|
-
const toolRecs = getToolRecommendations(projectInfo);
|
|
74
|
-
recommendations.push(...toolRecs);
|
|
75
|
-
}
|
|
76
|
-
let filtered = recommendations;
|
|
77
|
-
if (!options.includeCommunity) {
|
|
78
|
-
filtered = filtered.filter((r) => r.metadata?.tags?.includes("official"));
|
|
79
|
-
}
|
|
80
|
-
if (!options.includePremium) {
|
|
81
|
-
filtered = filtered.filter((r) => !r.metadata?.tags?.includes("premium"));
|
|
82
|
-
}
|
|
83
|
-
if (options.limit > 0) {
|
|
84
|
-
filtered = filtered.slice(0, options.limit);
|
|
85
|
-
}
|
|
86
|
-
filtered.sort((a, b) => (b.priority || 0) - (a.priority || 0));
|
|
87
|
-
return filtered;
|
|
88
|
-
}
|
|
89
|
-
function getBaseRecommendations(projectInfo) {
|
|
90
|
-
const recommendations = [];
|
|
91
|
-
const projectType = projectInfo.projectType.toLowerCase();
|
|
92
|
-
if (projectType.includes("typescript") || projectType.includes("javascript")) {
|
|
93
|
-
recommendations.push(
|
|
94
|
-
{
|
|
95
|
-
name: "cloud-pre-commit-security",
|
|
96
|
-
description: "Advanced security scanning (Cloud)",
|
|
97
|
-
type: "pre-commit",
|
|
98
|
-
category: "pre-commit",
|
|
99
|
-
projectTypes: ["typescript", "javascript"],
|
|
100
|
-
trigger: {
|
|
101
|
-
matcher: "git:pre-commit"
|
|
102
|
-
},
|
|
103
|
-
action: {
|
|
104
|
-
command: "ccjk-cloud",
|
|
105
|
-
args: ["scan", "security", "--staged"],
|
|
106
|
-
timeout: 6e4
|
|
107
|
-
},
|
|
108
|
-
enabled: true,
|
|
109
|
-
priority: 200,
|
|
110
|
-
metadata: {
|
|
111
|
-
tags: ["official", "security", "cloud"],
|
|
112
|
-
version: "1.0.0"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
name: "cloud-dependency-check",
|
|
117
|
-
description: "Check for vulnerable dependencies",
|
|
118
|
-
type: "pre-commit",
|
|
119
|
-
category: "pre-commit",
|
|
120
|
-
projectTypes: ["typescript", "javascript"],
|
|
121
|
-
trigger: {
|
|
122
|
-
matcher: "git:pre-commit",
|
|
123
|
-
condition: "package-lock.json || yarn.lock || pnpm-lock.yaml"
|
|
124
|
-
},
|
|
125
|
-
action: {
|
|
126
|
-
command: "ccjk-cloud",
|
|
127
|
-
args: ["audit", "dependencies"],
|
|
128
|
-
timeout: 3e4
|
|
129
|
-
},
|
|
130
|
-
enabled: true,
|
|
131
|
-
priority: 190,
|
|
132
|
-
metadata: {
|
|
133
|
-
tags: ["official", "security", "cloud"],
|
|
134
|
-
version: "1.0.0"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
if (projectType.includes("python")) {
|
|
140
|
-
recommendations.push(
|
|
141
|
-
{
|
|
142
|
-
name: "cloud-python-security",
|
|
143
|
-
description: "Python security analysis",
|
|
144
|
-
type: "pre-commit",
|
|
145
|
-
category: "pre-commit",
|
|
146
|
-
projectTypes: ["python"],
|
|
147
|
-
trigger: {
|
|
148
|
-
matcher: "git:pre-commit"
|
|
149
|
-
},
|
|
150
|
-
action: {
|
|
151
|
-
command: "ccjk-cloud",
|
|
152
|
-
args: ["scan", "python-security"],
|
|
153
|
-
timeout: 45e3
|
|
154
|
-
},
|
|
155
|
-
enabled: true,
|
|
156
|
-
priority: 200,
|
|
157
|
-
metadata: {
|
|
158
|
-
tags: ["official", "security", "cloud"],
|
|
159
|
-
version: "1.0.0"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
if (projectType.includes("rust")) {
|
|
165
|
-
recommendations.push(
|
|
166
|
-
{
|
|
167
|
-
name: "cloud-rust-audit",
|
|
168
|
-
description: "Audit Rust dependencies for vulnerabilities",
|
|
169
|
-
type: "pre-commit",
|
|
170
|
-
category: "pre-commit",
|
|
171
|
-
projectTypes: ["rust"],
|
|
172
|
-
trigger: {
|
|
173
|
-
matcher: "git:pre-commit",
|
|
174
|
-
condition: "Cargo.lock"
|
|
175
|
-
},
|
|
176
|
-
action: {
|
|
177
|
-
command: "ccjk-cloud",
|
|
178
|
-
args: ["audit", "cargo"],
|
|
179
|
-
timeout: 3e4
|
|
180
|
-
},
|
|
181
|
-
enabled: true,
|
|
182
|
-
priority: 200,
|
|
183
|
-
metadata: {
|
|
184
|
-
tags: ["official", "security", "cloud"],
|
|
185
|
-
version: "1.0.0"
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
return recommendations;
|
|
191
|
-
}
|
|
192
|
-
function getFrameworkRecommendations(projectInfo) {
|
|
193
|
-
const recommendations = [];
|
|
194
|
-
for (const framework of projectInfo.frameworks) {
|
|
195
|
-
const frameworkName = framework.name.toLowerCase();
|
|
196
|
-
if (frameworkName.includes("react")) {
|
|
197
|
-
recommendations.push(
|
|
198
|
-
{
|
|
199
|
-
name: "cloud-react-performance",
|
|
200
|
-
description: "Analyze React bundle performance",
|
|
201
|
-
type: "post-build",
|
|
202
|
-
category: "lifecycle",
|
|
203
|
-
projectTypes: ["typescript", "javascript"],
|
|
204
|
-
trigger: {
|
|
205
|
-
matcher: "command:*build*"
|
|
206
|
-
},
|
|
207
|
-
action: {
|
|
208
|
-
command: "ccjk-cloud",
|
|
209
|
-
args: ["analyze", "react-bundle"],
|
|
210
|
-
timeout: 3e4
|
|
211
|
-
},
|
|
212
|
-
enabled: true,
|
|
213
|
-
priority: 150,
|
|
214
|
-
metadata: {
|
|
215
|
-
tags: ["official", "react", "performance", "cloud"],
|
|
216
|
-
version: "1.0.0"
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
if (frameworkName.includes("vue")) {
|
|
222
|
-
recommendations.push(
|
|
223
|
-
{
|
|
224
|
-
name: "cloud-vue-analysis",
|
|
225
|
-
description: "Vue specific code analysis",
|
|
226
|
-
type: "pre-commit",
|
|
227
|
-
category: "pre-commit",
|
|
228
|
-
projectTypes: ["typescript", "javascript"],
|
|
229
|
-
trigger: {
|
|
230
|
-
matcher: "git:pre-commit"
|
|
231
|
-
},
|
|
232
|
-
action: {
|
|
233
|
-
command: "ccjk-cloud",
|
|
234
|
-
args: ["analyze", "vue"],
|
|
235
|
-
timeout: 2e4
|
|
236
|
-
},
|
|
237
|
-
enabled: true,
|
|
238
|
-
priority: 150,
|
|
239
|
-
metadata: {
|
|
240
|
-
tags: ["official", "vue", "cloud"],
|
|
241
|
-
version: "1.0.0"
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
if (frameworkName.includes("django")) {
|
|
247
|
-
recommendations.push(
|
|
248
|
-
{
|
|
249
|
-
name: "cloud-django-checks",
|
|
250
|
-
description: "Run Django system checks",
|
|
251
|
-
type: "pre-commit",
|
|
252
|
-
category: "pre-commit",
|
|
253
|
-
projectTypes: ["python"],
|
|
254
|
-
trigger: {
|
|
255
|
-
matcher: "git:pre-commit",
|
|
256
|
-
condition: "*.py"
|
|
257
|
-
},
|
|
258
|
-
action: {
|
|
259
|
-
command: "ccjk-cloud",
|
|
260
|
-
args: ["django", "checks"],
|
|
261
|
-
timeout: 15e3
|
|
262
|
-
},
|
|
263
|
-
enabled: true,
|
|
264
|
-
priority: 150,
|
|
265
|
-
metadata: {
|
|
266
|
-
tags: ["official", "django", "cloud"],
|
|
267
|
-
version: "1.0.0"
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
return recommendations;
|
|
274
|
-
}
|
|
275
|
-
function getToolRecommendations(projectInfo) {
|
|
276
|
-
const recommendations = [];
|
|
277
|
-
const configFiles = projectInfo.configFiles || [];
|
|
278
|
-
if (configFiles.some((f) => f.includes("eslint"))) {
|
|
279
|
-
recommendations.push({
|
|
280
|
-
name: "cloud-eslint-advanced",
|
|
281
|
-
description: "Advanced ESLint analysis with custom rules",
|
|
282
|
-
type: "pre-commit",
|
|
283
|
-
category: "pre-commit",
|
|
284
|
-
projectTypes: ["typescript", "javascript"],
|
|
285
|
-
trigger: {
|
|
286
|
-
matcher: "git:pre-commit"
|
|
287
|
-
},
|
|
288
|
-
action: {
|
|
289
|
-
command: "ccjk-cloud",
|
|
290
|
-
args: ["lint", "eslint", "--advanced"],
|
|
291
|
-
timeout: 25e3
|
|
292
|
-
},
|
|
293
|
-
enabled: true,
|
|
294
|
-
priority: 140,
|
|
295
|
-
metadata: {
|
|
296
|
-
tags: ["official", "eslint", "cloud"],
|
|
297
|
-
version: "1.0.0"
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
if (configFiles.some((f) => f.includes("jest") || f.includes("vitest") || f.includes("mocha"))) {
|
|
302
|
-
recommendations.push({
|
|
303
|
-
name: "cloud-test-intelligence",
|
|
304
|
-
description: "Smart test execution based on changes",
|
|
305
|
-
type: "pre-commit",
|
|
306
|
-
category: "pre-commit",
|
|
307
|
-
projectTypes: ["typescript", "javascript"],
|
|
308
|
-
trigger: {
|
|
309
|
-
matcher: "git:pre-commit"
|
|
310
|
-
},
|
|
311
|
-
action: {
|
|
312
|
-
command: "ccjk-cloud",
|
|
313
|
-
args: ["test", "intelligent"],
|
|
314
|
-
timeout: 12e4
|
|
315
|
-
},
|
|
316
|
-
enabled: true,
|
|
317
|
-
priority: 160,
|
|
318
|
-
metadata: {
|
|
319
|
-
tags: ["official", "testing", "cloud", "intelligent"],
|
|
320
|
-
version: "1.0.0"
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
return recommendations;
|
|
325
|
-
}
|
|
326
|
-
async function submitHookAnalytics(hookName, projectInfo, result) {
|
|
327
|
-
try {
|
|
328
|
-
console.log(`Analytics: Hook ${hookName} ${result} for ${projectInfo.projectType} project`);
|
|
329
|
-
} catch (_error) {
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
async function getCommunityHooks(limit = 10, category) {
|
|
333
|
-
const communityHooks = [
|
|
334
|
-
{
|
|
335
|
-
name: "community-commit-emoji",
|
|
336
|
-
description: "Add emoji to commit messages based on changes",
|
|
337
|
-
type: "post-commit",
|
|
338
|
-
category: "lifecycle",
|
|
339
|
-
projectTypes: ["typescript", "javascript", "python"],
|
|
340
|
-
trigger: {
|
|
341
|
-
matcher: "git:post-commit"
|
|
342
|
-
},
|
|
343
|
-
action: {
|
|
344
|
-
command: "ccjk-community",
|
|
345
|
-
args: ["commit-emoji"],
|
|
346
|
-
timeout: 5e3
|
|
347
|
-
},
|
|
348
|
-
enabled: true,
|
|
349
|
-
priority: 100,
|
|
350
|
-
metadata: {
|
|
351
|
-
tags: ["community", "git", "fun"],
|
|
352
|
-
author: "ccjk-user-123",
|
|
353
|
-
version: "1.0.0"
|
|
354
|
-
}
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
name: "community-code-poetry",
|
|
358
|
-
description: "Generate poetry from your code",
|
|
359
|
-
type: "post-commit",
|
|
360
|
-
category: "lifecycle",
|
|
361
|
-
projectTypes: ["typescript", "javascript", "python"],
|
|
362
|
-
trigger: {
|
|
363
|
-
matcher: "git:post-commit"
|
|
364
|
-
},
|
|
365
|
-
action: {
|
|
366
|
-
command: "ccjk-community",
|
|
367
|
-
args: ["code-poetry"],
|
|
368
|
-
timeout: 1e4
|
|
369
|
-
},
|
|
370
|
-
enabled: false,
|
|
371
|
-
priority: 50,
|
|
372
|
-
metadata: {
|
|
373
|
-
tags: ["community", "fun", "ai"],
|
|
374
|
-
author: "poet-coder",
|
|
375
|
-
version: "1.0.0"
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
];
|
|
379
|
-
let filtered = communityHooks;
|
|
380
|
-
if (category) {
|
|
381
|
-
filtered = filtered.filter((h) => h.category === category);
|
|
382
|
-
}
|
|
383
|
-
return filtered.slice(0, limit);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
50
|
async function getCloudRecommendations(analysis) {
|
|
387
51
|
try {
|
|
388
52
|
const client = createCloudClient();
|
|
@@ -606,15 +270,8 @@ function validateUsageReport(report) {
|
|
|
606
270
|
const errors = [];
|
|
607
271
|
if (!report.reportId || typeof report.reportId !== "string")
|
|
608
272
|
errors.push("reportId is required and must be a string");
|
|
609
|
-
|
|
610
|
-
"
|
|
611
|
-
"recommendation_shown",
|
|
612
|
-
"recommendation_accepted",
|
|
613
|
-
"analysis_completed",
|
|
614
|
-
"error_occurred"
|
|
615
|
-
];
|
|
616
|
-
if (!validMetricTypes.includes(report.metricType))
|
|
617
|
-
errors.push(`metricType must be one of: ${validMetricTypes.join(", ")}`);
|
|
273
|
+
if (!report.metricType || typeof report.metricType !== "string")
|
|
274
|
+
errors.push("metricType is required and must be a string");
|
|
618
275
|
if (!report.timestamp || typeof report.timestamp !== "string")
|
|
619
276
|
errors.push("timestamp is required and must be a string");
|
|
620
277
|
if (!report.ccjkVersion || typeof report.ccjkVersion !== "string")
|
|
@@ -623,6 +280,10 @@ function validateUsageReport(report) {
|
|
|
623
280
|
errors.push("nodeVersion is required and must be a string");
|
|
624
281
|
if (!report.platform || typeof report.platform !== "string")
|
|
625
282
|
errors.push("platform is required and must be a string");
|
|
283
|
+
if (report.deviceId !== void 0 && typeof report.deviceId !== "string")
|
|
284
|
+
errors.push("deviceId must be a string when provided");
|
|
285
|
+
if (report.clientVersion !== void 0 && typeof report.clientVersion !== "string")
|
|
286
|
+
errors.push("clientVersion must be a string when provided");
|
|
626
287
|
return {
|
|
627
288
|
valid: errors.length === 0,
|
|
628
289
|
errors
|
|
@@ -659,7 +320,7 @@ function isTemplateParameterValue(value) {
|
|
|
659
320
|
return false;
|
|
660
321
|
}
|
|
661
322
|
|
|
662
|
-
const API_BASE_URL$2 =
|
|
323
|
+
const API_BASE_URL$2 = `${CLOUD_ENDPOINTS.MAIN.BASE_URL}${CLOUD_ENDPOINTS.MAIN.API_VERSION}`;
|
|
663
324
|
var RatingsApiErrorCode = /* @__PURE__ */ ((RatingsApiErrorCode2) => {
|
|
664
325
|
RatingsApiErrorCode2["DUPLICATE_RATING"] = "DUPLICATE_RATING";
|
|
665
326
|
RatingsApiErrorCode2["INVALID_RATING_VALUE"] = "INVALID_RATING_VALUE";
|
|
@@ -846,7 +507,7 @@ const ratingsApi = {
|
|
|
846
507
|
isSkillNotFoundError
|
|
847
508
|
};
|
|
848
509
|
|
|
849
|
-
const API_BASE_URL$1 =
|
|
510
|
+
const API_BASE_URL$1 = `${CLOUD_ENDPOINTS.MAIN.BASE_URL}${CLOUD_ENDPOINTS.MAIN.API_VERSION}`;
|
|
850
511
|
const DEFAULT_CACHE_TTL = 5 * 60 * 1e3;
|
|
851
512
|
class SkillsMarketplaceApiError extends Error {
|
|
852
513
|
/** HTTP status code */
|
|
@@ -1066,7 +727,7 @@ const skillsMarketplaceApi = {
|
|
|
1066
727
|
createAbortController
|
|
1067
728
|
};
|
|
1068
729
|
|
|
1069
|
-
const API_BASE_URL =
|
|
730
|
+
const API_BASE_URL = `${CLOUD_ENDPOINTS.MAIN.BASE_URL}${CLOUD_ENDPOINTS.MAIN.API_VERSION}`;
|
|
1070
731
|
function buildUrl(endpoint, params) {
|
|
1071
732
|
const url = new URL(`${API_BASE_URL}${endpoint}`);
|
|
1072
733
|
if (params) {
|
|
@@ -4941,4 +4602,4 @@ function assert(condition, message) {
|
|
|
4941
4602
|
}
|
|
4942
4603
|
}
|
|
4943
4604
|
|
|
4944
|
-
export { AiderTool, BaseCodeTool, BaseError, ClaudeCodeTool, ClineTool, CodexTool, ConfigManager, ConfigValidator, ConfigurationError, ContinueTool, CursorTool, InternalError, Logger, Mutex, NotFoundError, RatingsApiError, RatingsApiErrorCode, Semaphore, TimeoutError, ToolFactory, ToolRegistry, UnauthorizedError, ValidationError, index$6 as array, assert, assertDefined, index$5 as async, batchProcessFiles, camelCase, canInstallMore, capitalize, chunk, index$4 as command, commandExists, convertBatchTemplateResponse, convertConfig, convertParameterDefault, convertProjectAnalysisResponse, convertRecommendation, convertTemplate, convertTemplateParameter, copyFile, countLines, createCloudClient, createConfigManager, createLogger, createRating, createTool, createValidator, debounce, deepClone, deepMerge, deleteDir, deleteFile, difference, ensureDir, index$3 as error, executeCommand, executeCommandStream, exists, extractString, flatten, flatten$1 as flattenArray, formatError, index$2 as fs, generateCompactWelcome, generateRecommendations, generateWelcome, get, getArchitecture, getCacheDir, getCapabilitiesByType, getCapability, getCloudMcpRecommendations, getCloudRecommendations,
|
|
4605
|
+
export { AiderTool, BaseCodeTool, BaseError, ClaudeCodeTool, ClineTool, CodexTool, ConfigManager, ConfigValidator, ConfigurationError, ContinueTool, CursorTool, InternalError, Logger, Mutex, NotFoundError, RatingsApiError, RatingsApiErrorCode, Semaphore, TimeoutError, ToolFactory, ToolRegistry, UnauthorizedError, ValidationError, index$6 as array, assert, assertDefined, index$5 as async, batchProcessFiles, camelCase, canInstallMore, capitalize, chunk, index$4 as command, commandExists, convertBatchTemplateResponse, convertConfig, convertParameterDefault, convertProjectAnalysisResponse, convertRecommendation, convertTemplate, convertTemplateParameter, copyFile, countLines, createCloudClient, createConfigManager, createLogger, createRating, createTool, createValidator, debounce, deepClone, deepMerge, deleteDir, deleteFile, difference, ensureDir, index$3 as error, executeCommand, executeCommandStream, exists, extractString, flatten, flatten$1 as flattenArray, formatError, index$2 as fs, generateCompactWelcome, generateRecommendations, generateWelcome, get, getArchitecture, getCacheDir, getCapabilitiesByType, getCapability, getCloudMcpRecommendations, getCloudRecommendations, getCloudSkillRecommendations, getCommandPath, getCommandVersion, getConfigDir, getDataDir, getDisabledSkills, getEnabledSkills, getErrorMessage, getFileInfo, getFileSize, getHomeDir, getPlatform, getPlatformInfo, getQuotaUsagePercentage, getRecommendations, getRegistry, getSkillRatings, getTempDir, getUserQuota, getUserSkills, has, installSkill, intersection, isArray, isBoolean, isDefined, isDirectory, isDuplicateRatingError, isEmail, isFile, isLargeFile, isLinux, isMacOS, isNumber, isObject, isRecommendationConfig, isSkillInstalled, isSkillNotFoundError, isString, isTelemetryEventData, isTemplateParameterValue, isURL, isUnauthorizedError, isUnix, isWindows, kebabCase, listDirs, listFiles, logger, moveFile, index$1 as object, omit, parallelLimit, partition, pascalCase, pick, processLargeFile, processLineByLine, ratingsApi, readFile, readJSON, retry, scanCapabilities, sequence, set, shuffle, skillsMarketplaceApi, sleep, slugify, snakeCase, sortByLastUsed, sortByUsage, streamJSON, streamWriteJSON, index as string, template, throttle, timeout, truncate, tryCatch, tryCatchAsync, unflatten, uninstallSkill, union, unique, updateSkill, userSkillsApi, validateBatchTemplateRequest, validateProjectAnalysisRequest, validateUsageReport, validation, validators, waitFor, wrapError, writeFile, writeJSON };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { existsSync, readFileSync, mkdirSync, unlinkSync } from 'node:fs';
|
|
2
2
|
import os__default, { homedir } from 'node:os';
|
|
3
|
-
import { c as createDefaultGateway } from './ccjk.
|
|
3
|
+
import { c as createDefaultGateway } from './ccjk.D0g2ABGg.mjs';
|
|
4
4
|
import { writeFileAtomic } from '../chunks/fs-operations.mjs';
|
|
5
5
|
import { Buffer } from 'node:buffer';
|
|
6
6
|
import crypto from 'node:crypto';
|
|
7
|
+
import { CLOUD_ENDPOINTS } from '../chunks/constants.mjs';
|
|
7
8
|
import { j as join } from './ccjk.bQ7Dh1g4.mjs';
|
|
8
9
|
|
|
9
10
|
function validateBindRequest(request) {
|
|
@@ -237,7 +238,7 @@ function maskToken(token) {
|
|
|
237
238
|
return `${prefix}***...***${suffix}`;
|
|
238
239
|
}
|
|
239
240
|
|
|
240
|
-
const CLOUD_API_BASE_URL =
|
|
241
|
+
const CLOUD_API_BASE_URL = CLOUD_ENDPOINTS.MAIN.BASE_URL;
|
|
241
242
|
const POLL_TIMEOUT = 6e4;
|
|
242
243
|
const TOKEN_FILE_PATH = join(homedir(), ".ccjk", "cloud-token.json");
|
|
243
244
|
class CCJKCloudClient {
|