cullit 0.3.0 → 0.4.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/index.js +39 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -7,6 +7,10 @@ import { getRecentTags } from "@cullit/core";
|
|
|
7
7
|
import { writeFileSync, readFileSync, existsSync } from "fs";
|
|
8
8
|
import { resolve } from "path";
|
|
9
9
|
import { createInterface } from "readline";
|
|
10
|
+
try {
|
|
11
|
+
await import("@cullit/pro");
|
|
12
|
+
} catch {
|
|
13
|
+
}
|
|
10
14
|
function loadEnv() {
|
|
11
15
|
const envPath = resolve(process.cwd(), ".env");
|
|
12
16
|
if (!existsSync(envPath)) return;
|
|
@@ -252,14 +256,49 @@ function ask(rl, question) {
|
|
|
252
256
|
}
|
|
253
257
|
async function interactiveInit() {
|
|
254
258
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
259
|
+
const VALID_PROVIDERS = ["anthropic", "openai", "gemini", "ollama", "openclaw", "none"];
|
|
260
|
+
const VALID_SOURCES = ["local", "jira", "linear"];
|
|
261
|
+
const VALID_AUDIENCES = ["developer", "end-user", "executive"];
|
|
262
|
+
const VALID_TONES = ["professional", "casual", "terse"];
|
|
263
|
+
const VALID_ENRICHMENTS = ["jira", "linear", "both", "none"];
|
|
255
264
|
console.log("\n Cullit \u2014 Project Setup\n");
|
|
256
265
|
const provider = await ask(rl, " AI provider (anthropic/openai/gemini/ollama/openclaw/none) [anthropic]: ") || "anthropic";
|
|
266
|
+
if (!VALID_PROVIDERS.includes(provider)) {
|
|
267
|
+
console.error(`
|
|
268
|
+
\u2717 Invalid provider: ${provider}. Must be one of: ${VALID_PROVIDERS.join(", ")}`);
|
|
269
|
+
rl.close();
|
|
270
|
+
process.exit(1);
|
|
271
|
+
}
|
|
257
272
|
const source = await ask(rl, " Source type (local/jira/linear) [local]: ") || "local";
|
|
273
|
+
if (!VALID_SOURCES.includes(source)) {
|
|
274
|
+
console.error(`
|
|
275
|
+
\u2717 Invalid source: ${source}. Must be one of: ${VALID_SOURCES.join(", ")}`);
|
|
276
|
+
rl.close();
|
|
277
|
+
process.exit(1);
|
|
278
|
+
}
|
|
258
279
|
const audience = await ask(rl, " Audience (developer/end-user/executive) [developer]: ") || "developer";
|
|
280
|
+
if (!VALID_AUDIENCES.includes(audience)) {
|
|
281
|
+
console.error(`
|
|
282
|
+
\u2717 Invalid audience: ${audience}. Must be one of: ${VALID_AUDIENCES.join(", ")}`);
|
|
283
|
+
rl.close();
|
|
284
|
+
process.exit(1);
|
|
285
|
+
}
|
|
259
286
|
const tone = await ask(rl, " Tone (professional/casual/terse) [professional]: ") || "professional";
|
|
287
|
+
if (!VALID_TONES.includes(tone)) {
|
|
288
|
+
console.error(`
|
|
289
|
+
\u2717 Invalid tone: ${tone}. Must be one of: ${VALID_TONES.join(", ")}`);
|
|
290
|
+
rl.close();
|
|
291
|
+
process.exit(1);
|
|
292
|
+
}
|
|
260
293
|
let enrichment = "";
|
|
261
294
|
if (source === "local") {
|
|
262
295
|
enrichment = await ask(rl, " Enrich from (jira/linear/both/none) [none]: ") || "none";
|
|
296
|
+
if (!VALID_ENRICHMENTS.includes(enrichment)) {
|
|
297
|
+
console.error(`
|
|
298
|
+
\u2717 Invalid enrichment: ${enrichment}. Must be one of: ${VALID_ENRICHMENTS.join(", ")}`);
|
|
299
|
+
rl.close();
|
|
300
|
+
process.exit(1);
|
|
301
|
+
}
|
|
263
302
|
}
|
|
264
303
|
rl.close();
|
|
265
304
|
const enrichmentLine = enrichment === "both" ? "\n enrichment: [jira, linear]" : enrichment === "jira" || enrichment === "linear" ? `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cullit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Cull the noise from your releases. AI-powered release notes from the CLI.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"node": ">=18"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@cullit/
|
|
33
|
-
"@cullit/
|
|
32
|
+
"@cullit/config": "0.4.0",
|
|
33
|
+
"@cullit/core": "0.4.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup src/index.ts --format esm --clean",
|