cullit 0.4.0 → 1.0.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 +25 -10
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import { runPipeline, VERSION, createLogger, analyzeReleaseReadiness, resolveLicense } from "@cullit/core";
|
|
4
|
+
import { runPipeline, VERSION, createLogger, analyzeReleaseReadiness, resolveLicense, AI_PROVIDERS, AUDIENCES, TONES, SOURCE_TYPES } from "@cullit/core";
|
|
5
5
|
import { loadConfig } from "@cullit/config";
|
|
6
6
|
import { getRecentTags } from "@cullit/core";
|
|
7
7
|
import { writeFileSync, readFileSync, existsSync } from "fs";
|
|
@@ -50,7 +50,7 @@ var HELP = `
|
|
|
50
50
|
--format Output format: markdown, html, json (default: markdown)
|
|
51
51
|
--dry-run Generate but don't publish
|
|
52
52
|
--provider Override AI provider (anthropic, openai, gemini, ollama, openclaw, none)
|
|
53
|
-
--source Override source type (local, jira, linear)
|
|
53
|
+
--source Override source type (local, jira, linear, gitlab, bitbucket)
|
|
54
54
|
--audience Override audience (developer, end-user, executive)
|
|
55
55
|
--verbose Show detailed output
|
|
56
56
|
--quiet Suppress all output except errors
|
|
@@ -62,6 +62,7 @@ var HELP = `
|
|
|
62
62
|
$ cullit generate --from HEAD~5 --provider none # no AI key needed
|
|
63
63
|
$ cullit generate --source jira --from "project = PROJ" --provider anthropic
|
|
64
64
|
$ cullit generate --source linear --from "team:ENG" --provider openai
|
|
65
|
+
$ cullit generate --source gitlab --from v1.0.0 --to v1.1.0
|
|
65
66
|
$ cullit init
|
|
66
67
|
`;
|
|
67
68
|
async function main() {
|
|
@@ -131,9 +132,9 @@ async function runGenerate(from, to, opts) {
|
|
|
131
132
|
process.exitCode = 1;
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
134
|
-
const VALID_PROVIDERS =
|
|
135
|
-
const VALID_AUDIENCES =
|
|
136
|
-
const VALID_SOURCES =
|
|
135
|
+
const VALID_PROVIDERS = AI_PROVIDERS;
|
|
136
|
+
const VALID_AUDIENCES = AUDIENCES;
|
|
137
|
+
const VALID_SOURCES = SOURCE_TYPES;
|
|
137
138
|
if (opts.provider) {
|
|
138
139
|
if (!VALID_PROVIDERS.includes(opts.provider)) {
|
|
139
140
|
console.error(`
|
|
@@ -256,10 +257,10 @@ function ask(rl, question) {
|
|
|
256
257
|
}
|
|
257
258
|
async function interactiveInit() {
|
|
258
259
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
259
|
-
const VALID_PROVIDERS =
|
|
260
|
-
const VALID_SOURCES =
|
|
261
|
-
const VALID_AUDIENCES =
|
|
262
|
-
const VALID_TONES =
|
|
260
|
+
const VALID_PROVIDERS = AI_PROVIDERS;
|
|
261
|
+
const VALID_SOURCES = SOURCE_TYPES;
|
|
262
|
+
const VALID_AUDIENCES = AUDIENCES;
|
|
263
|
+
const VALID_TONES = TONES;
|
|
263
264
|
const VALID_ENRICHMENTS = ["jira", "linear", "both", "none"];
|
|
264
265
|
console.log("\n Cullit \u2014 Project Setup\n");
|
|
265
266
|
const provider = await ask(rl, " AI provider (anthropic/openai/gemini/ollama/openclaw/none) [anthropic]: ") || "anthropic";
|
|
@@ -269,7 +270,7 @@ async function interactiveInit() {
|
|
|
269
270
|
rl.close();
|
|
270
271
|
process.exit(1);
|
|
271
272
|
}
|
|
272
|
-
const source = await ask(rl, " Source type (local/jira/linear) [local]: ") || "local";
|
|
273
|
+
const source = await ask(rl, " Source type (local/jira/linear/gitlab/bitbucket) [local]: ") || "local";
|
|
273
274
|
if (!VALID_SOURCES.includes(source)) {
|
|
274
275
|
console.error(`
|
|
275
276
|
\u2717 Invalid source: ${source}. Must be one of: ${VALID_SOURCES.join(", ")}`);
|
|
@@ -315,6 +316,20 @@ jira:
|
|
|
315
316
|
linear:
|
|
316
317
|
# Set LINEAR_API_KEY in your environment`);
|
|
317
318
|
}
|
|
319
|
+
if (source === "gitlab") {
|
|
320
|
+
sections.push(`
|
|
321
|
+
gitlab:
|
|
322
|
+
projectId: "12345" # GitLab project ID
|
|
323
|
+
# domain: gitlab.com # optional: self-hosted domain
|
|
324
|
+
# Set GITLAB_TOKEN in your environment`);
|
|
325
|
+
}
|
|
326
|
+
if (source === "bitbucket") {
|
|
327
|
+
sections.push(`
|
|
328
|
+
bitbucket:
|
|
329
|
+
workspace: your-workspace
|
|
330
|
+
repoSlug: your-repo
|
|
331
|
+
# Set BITBUCKET_USERNAME and BITBUCKET_APP_PASSWORD in your environment`);
|
|
332
|
+
}
|
|
318
333
|
const yml = `# Cullit Configuration
|
|
319
334
|
# https://cullit.io
|
|
320
335
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cullit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.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/config": "0.
|
|
33
|
-
"@cullit/core": "0.
|
|
32
|
+
"@cullit/config": "1.0.0",
|
|
33
|
+
"@cullit/core": "1.0.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup src/index.ts --format esm --clean",
|