@cullit/core 2.0.1 → 2.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.
- package/dist/index.d.ts +4 -2
- package/dist/index.js +8 -7
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ interface PipelineResult {
|
|
|
71
71
|
duration: number;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
declare const VERSION = "2.0.
|
|
74
|
+
declare const VERSION = "2.0.3";
|
|
75
75
|
declare const DEFAULT_CATEGORIES: string[];
|
|
76
76
|
declare const DEFAULT_MODELS: Record<string, string>;
|
|
77
77
|
declare const AI_PROVIDERS: readonly ["anthropic", "openai", "gemini", "ollama", "none"];
|
|
@@ -263,8 +263,10 @@ declare function isEnrichmentAllowed(license: LicenseStatus): boolean;
|
|
|
263
263
|
declare function isAudienceToneAllowed(license: LicenseStatus): boolean;
|
|
264
264
|
/**
|
|
265
265
|
* Build a human-readable upgrade message for a gated feature.
|
|
266
|
+
* @param feature - The feature name to include in the message.
|
|
267
|
+
* @param minTier - Optional minimum tier required (e.g. 'pro', 'team').
|
|
266
268
|
*/
|
|
267
|
-
declare function upgradeMessage(feature: string): string;
|
|
269
|
+
declare function upgradeMessage(feature: string, minTier?: string): string;
|
|
268
270
|
interface UsageLimits {
|
|
269
271
|
generationsPerMonth: number;
|
|
270
272
|
maxProjects: number;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/constants.ts
|
|
2
|
-
var VERSION = "2.0.
|
|
2
|
+
var VERSION = "2.0.3";
|
|
3
3
|
var DEFAULT_CATEGORIES = ["features", "fixes", "breaking", "improvements", "chores"];
|
|
4
4
|
var DEFAULT_MODELS = {
|
|
5
5
|
anthropic: "claude-sonnet-4-20250514",
|
|
@@ -843,8 +843,9 @@ function isEnrichmentAllowed(license) {
|
|
|
843
843
|
function isAudienceToneAllowed(license) {
|
|
844
844
|
return (license.tier === "pro" || license.tier === "team" || license.tier === "enterprise") && license.valid;
|
|
845
845
|
}
|
|
846
|
-
function upgradeMessage(feature) {
|
|
847
|
-
|
|
846
|
+
function upgradeMessage(feature, minTier) {
|
|
847
|
+
const tierLabel = minTier === "team" ? "a Team plan or above" : minTier === "pro" ? "a Pro plan or above" : minTier === "enterprise" ? "an Enterprise plan" : "a paid Cullit plan";
|
|
848
|
+
return `\u{1F512} ${feature} requires ${tierLabel}.
|
|
848
849
|
Upgrade at https://cullit.io/pricing
|
|
849
850
|
Then set CULLIT_API_KEY in your environment.`;
|
|
850
851
|
}
|
|
@@ -863,7 +864,7 @@ var FEATURE_TIERS = {
|
|
|
863
864
|
approvals: /* @__PURE__ */ new Set(["team", "enterprise"]),
|
|
864
865
|
shared_history: /* @__PURE__ */ new Set(["team", "enterprise"]),
|
|
865
866
|
project_templates: /* @__PURE__ */ new Set(["team", "enterprise"]),
|
|
866
|
-
hosted_changelog: /* @__PURE__ */ new Set(["
|
|
867
|
+
hosted_changelog: /* @__PURE__ */ new Set(["pro", "team", "enterprise"]),
|
|
867
868
|
branded_widget: /* @__PURE__ */ new Set(["team", "enterprise"]),
|
|
868
869
|
team_publishers: /* @__PURE__ */ new Set(["team", "enterprise"]),
|
|
869
870
|
org_settings: /* @__PURE__ */ new Set(["team", "enterprise"]),
|
|
@@ -1134,7 +1135,7 @@ async function runPipeline(from, to, config, options = {}) {
|
|
|
1134
1135
|
log.warn(`\u26A0 ${license.message || "Invalid CULLIT_API_KEY \u2014 running in free mode."}`);
|
|
1135
1136
|
}
|
|
1136
1137
|
if (!isProviderAllowed(config.ai.provider, license)) {
|
|
1137
|
-
throw new CullitError(CoreErrorCode.LICENSE_TIER_INSUFFICIENT, upgradeMessage(`AI provider "${config.ai.provider}"
|
|
1138
|
+
throw new CullitError(CoreErrorCode.LICENSE_TIER_INSUFFICIENT, upgradeMessage(`AI provider "${config.ai.provider}"`, "pro"));
|
|
1138
1139
|
}
|
|
1139
1140
|
const collectorFactory = getCollector(config.source.type);
|
|
1140
1141
|
if (!collectorFactory) {
|
|
@@ -1157,7 +1158,7 @@ async function runPipeline(from, to, config, options = {}) {
|
|
|
1157
1158
|
const enrichmentSources = config.source.enrichment || [];
|
|
1158
1159
|
for (const source of enrichmentSources) {
|
|
1159
1160
|
if (!isEnrichmentAllowed(license)) {
|
|
1160
|
-
log.info(`\xBB Skipping ${source} enrichment \u2014 ${upgradeMessage(`${source} enrichment
|
|
1161
|
+
log.info(`\xBB Skipping ${source} enrichment \u2014 ${upgradeMessage(`${source} enrichment`, "pro")}`);
|
|
1161
1162
|
continue;
|
|
1162
1163
|
}
|
|
1163
1164
|
const enricherFactory = getEnricher(source);
|
|
@@ -1206,7 +1207,7 @@ async function runPipeline(from, to, config, options = {}) {
|
|
|
1206
1207
|
for (const target of config.publish) {
|
|
1207
1208
|
try {
|
|
1208
1209
|
if (!isPublisherAllowed(target.type, license)) {
|
|
1209
|
-
log.info(`\xBB Skipping ${target.type} \u2014 ${upgradeMessage(`${target.type} publishing
|
|
1210
|
+
log.info(`\xBB Skipping ${target.type} \u2014 ${upgradeMessage(`${target.type} publishing`, "pro")}`);
|
|
1210
1211
|
continue;
|
|
1211
1212
|
}
|
|
1212
1213
|
const publisherFactory = getPublisher(target.type);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cullit/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core engine for Cullit — AI-powered release note generation.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@cullit/config": "2.0.
|
|
41
|
+
"@cullit/config": "2.0.3"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "tsup src/index.ts --format esm --dts --clean",
|