@fern-api/fern-api-dev 5.67.0 → 5.67.1
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/cli.cjs +174 -36
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -564284,7 +564284,8 @@ var require_AutoVersioningService = __commonJS({
|
|
|
564284
564284
|
contentLines.push(line);
|
|
564285
564285
|
}
|
|
564286
564286
|
}
|
|
564287
|
-
let processedContent = this.
|
|
564287
|
+
let processedContent = this.removeGoModulePathSuffixPairs(contentLines);
|
|
564288
|
+
processedContent = this.removeVersionChangePairs(processedContent, mappedMagicVersion);
|
|
564288
564289
|
processedContent = this.removeRemainingMagicVersionLines(processedContent, mappedMagicVersion);
|
|
564289
564290
|
let hasChanges2 = false;
|
|
564290
564291
|
for (const line of processedContent) {
|
|
@@ -564420,21 +564421,83 @@ var require_AutoVersioningService = __commonJS({
|
|
|
564420
564421
|
* so non-Go diffs like API URL version changes are not affected.
|
|
564421
564422
|
*/
|
|
564422
564423
|
isGoModulePathSuffixChange(minusLine, plusLine) {
|
|
564423
|
-
const
|
|
564424
|
-
const
|
|
564425
|
-
|
|
564426
|
-
const goModuleDirectivePattern = /^\s*module\s+(?:github\.com|golang\.org|google\.golang\.org|gopkg\.in)\/\S+/;
|
|
564427
|
-
const hasGoModulePath = goModulePathPattern.test(minusContent) || goModulePathPattern.test(plusContent) || goModuleDirectivePattern.test(minusContent.trim()) || goModuleDirectivePattern.test(plusContent.trim());
|
|
564428
|
-
if (!hasGoModulePath) {
|
|
564424
|
+
const minus = this.analyzeGoModulePathLine(minusLine);
|
|
564425
|
+
const plus = this.analyzeGoModulePathLine(plusLine);
|
|
564426
|
+
if (minus == null || plus == null) {
|
|
564429
564427
|
return false;
|
|
564430
564428
|
}
|
|
564431
|
-
|
|
564432
|
-
const minusWithoutSuffix = minusContent.replace(suffixPattern, "");
|
|
564433
|
-
const plusWithoutSuffix = plusContent.replace(suffixPattern, "");
|
|
564434
|
-
if (minusWithoutSuffix !== plusWithoutSuffix) {
|
|
564429
|
+
if (minus.strippedContent !== plus.strippedContent) {
|
|
564435
564430
|
return false;
|
|
564436
564431
|
}
|
|
564437
|
-
return
|
|
564432
|
+
return minus.hasSuffix || plus.hasSuffix;
|
|
564433
|
+
}
|
|
564434
|
+
/**
|
|
564435
|
+
* Removes Go module path `/vN` suffix-only churn from a diff section, regardless of how the
|
|
564436
|
+
* deletion and addition lines are laid out. `removeVersionChangePairs` only removes a deletion
|
|
564437
|
+
* when it can pair it with a *nearby* addition and keeps every line in between — so a diff that
|
|
564438
|
+
* groups all deletions before all additions (as Go import blocks do) leaks the suffix churn for
|
|
564439
|
+
* every line except the first. That churn then reaches the AI diff analyzer, which sees the
|
|
564440
|
+
* previously published `/vN` module path changing on every import and misclassifies a
|
|
564441
|
+
* no-op regeneration as a breaking change (spurious major bump).
|
|
564442
|
+
*
|
|
564443
|
+
* This pass matches each suffix-bearing deletion with any suffix-only-equivalent addition in
|
|
564444
|
+
* the section (by suffix-stripped content) and drops both, so only genuine content changes to
|
|
564445
|
+
* Go module path lines survive.
|
|
564446
|
+
*/
|
|
564447
|
+
removeGoModulePathSuffixPairs(lines) {
|
|
564448
|
+
const additions = [];
|
|
564449
|
+
for (let index3 = 0; index3 < lines.length; index3++) {
|
|
564450
|
+
const line = lines[index3];
|
|
564451
|
+
if (line == null || !this.isAdditionLine(line)) {
|
|
564452
|
+
continue;
|
|
564453
|
+
}
|
|
564454
|
+
const info = this.analyzeGoModulePathLine(line);
|
|
564455
|
+
if (info != null) {
|
|
564456
|
+
additions.push({ index: index3, strippedContent: info.strippedContent });
|
|
564457
|
+
}
|
|
564458
|
+
}
|
|
564459
|
+
const removed = /* @__PURE__ */ new Set();
|
|
564460
|
+
const usedAdditions = /* @__PURE__ */ new Set();
|
|
564461
|
+
for (let index3 = 0; index3 < lines.length; index3++) {
|
|
564462
|
+
const line = lines[index3];
|
|
564463
|
+
if (line == null || !this.isDeletionLine(line)) {
|
|
564464
|
+
continue;
|
|
564465
|
+
}
|
|
564466
|
+
const info = this.analyzeGoModulePathLine(line);
|
|
564467
|
+
if (info == null || !info.hasSuffix) {
|
|
564468
|
+
continue;
|
|
564469
|
+
}
|
|
564470
|
+
const match3 = additions.find((addition) => !usedAdditions.has(addition.index) && addition.strippedContent === info.strippedContent);
|
|
564471
|
+
if (match3 != null) {
|
|
564472
|
+
usedAdditions.add(match3.index);
|
|
564473
|
+
removed.add(index3);
|
|
564474
|
+
removed.add(match3.index);
|
|
564475
|
+
}
|
|
564476
|
+
}
|
|
564477
|
+
if (removed.size === 0) {
|
|
564478
|
+
return lines;
|
|
564479
|
+
}
|
|
564480
|
+
return lines.filter((_5, index3) => !removed.has(index3));
|
|
564481
|
+
}
|
|
564482
|
+
/**
|
|
564483
|
+
* If a diff line (with its leading +/- stripped) references a Go module path — either a quoted
|
|
564484
|
+
* import path or a `module` directive — returns its content with any `/vN` module-version
|
|
564485
|
+
* suffixes removed, plus whether a suffix was present. Returns undefined for non-Go lines so
|
|
564486
|
+
* unrelated diffs (e.g. API URL version segments) are never touched.
|
|
564487
|
+
*/
|
|
564488
|
+
analyzeGoModulePathLine(line) {
|
|
564489
|
+
const content5 = line.substring(1);
|
|
564490
|
+
const goModulePathPattern = /"[^"]*(?:github\.com|golang\.org|google\.golang\.org|gopkg\.in)\/[^"]*"/;
|
|
564491
|
+
const goModuleDirectivePattern = /^\s*module\s+(?:github\.com|golang\.org|google\.golang\.org|gopkg\.in)\/\S+/;
|
|
564492
|
+
const isGoModulePathLine = goModulePathPattern.test(content5) || goModuleDirectivePattern.test(content5.trim());
|
|
564493
|
+
if (!isGoModulePathLine) {
|
|
564494
|
+
return void 0;
|
|
564495
|
+
}
|
|
564496
|
+
const suffixPattern = /\/v\d+(?=\/|"|$)/g;
|
|
564497
|
+
return {
|
|
564498
|
+
strippedContent: content5.replace(suffixPattern, ""),
|
|
564499
|
+
hasSuffix: suffixPattern.test(content5)
|
|
564500
|
+
};
|
|
564438
564501
|
}
|
|
564439
564502
|
/**
|
|
564440
564503
|
* Gets the latest semantic version from git tags in the given repository.
|
|
@@ -564733,8 +564796,8 @@ var require_VersionUtils = __commonJS({
|
|
|
564733
564796
|
};
|
|
564734
564797
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
564735
564798
|
exports2.VersionBump = exports2.MAX_RAW_DIFF_BYTES = exports2.MAX_CHUNKS = exports2.MAX_AI_DIFF_BYTES = exports2.MAGIC_VERSION_PYTHON = exports2.MAGIC_VERSION = exports2.AUTO_VERSION = void 0;
|
|
564736
|
-
exports2.extractLanguageFromGeneratorName =
|
|
564737
|
-
exports2.mapMagicVersionForLanguage =
|
|
564799
|
+
exports2.extractLanguageFromGeneratorName = extractLanguageFromGeneratorName3;
|
|
564800
|
+
exports2.mapMagicVersionForLanguage = mapMagicVersionForLanguage4;
|
|
564738
564801
|
exports2.maxVersionBump = maxVersionBump3;
|
|
564739
564802
|
exports2.isAutoVersion = isAutoVersion5;
|
|
564740
564803
|
exports2.isValidSemver = isValidSemver;
|
|
@@ -564742,7 +564805,7 @@ var require_VersionUtils = __commonJS({
|
|
|
564742
564805
|
exports2.extractPreviousVersionFromDiffLine = extractPreviousVersionFromDiffLine;
|
|
564743
564806
|
var semver_1 = __importDefault2(require_semver2());
|
|
564744
564807
|
var AutoVersioningService_js_1 = require_AutoVersioningService();
|
|
564745
|
-
function
|
|
564808
|
+
function extractLanguageFromGeneratorName3(generatorName) {
|
|
564746
564809
|
const name2 = generatorName.toLowerCase();
|
|
564747
564810
|
if (name2.includes("typescript") || name2.includes("ts-sdk") || name2.includes("node-sdk")) {
|
|
564748
564811
|
return "typescript";
|
|
@@ -564779,7 +564842,7 @@ var require_VersionUtils = __commonJS({
|
|
|
564779
564842
|
exports2.AUTO_VERSION = "AUTO";
|
|
564780
564843
|
exports2.MAGIC_VERSION = "0.0.0-fern-placeholder";
|
|
564781
564844
|
exports2.MAGIC_VERSION_PYTHON = "0.0.0.dev0";
|
|
564782
|
-
function
|
|
564845
|
+
function mapMagicVersionForLanguage4(magicVersion, language) {
|
|
564783
564846
|
if (magicVersion !== exports2.MAGIC_VERSION) {
|
|
564784
564847
|
return magicVersion;
|
|
564785
564848
|
}
|
|
@@ -582073,6 +582136,8 @@ var require_GithubStep = __commonJS({
|
|
|
582073
582136
|
exports2.shouldCheckNoDiff = shouldCheckNoDiff;
|
|
582074
582137
|
exports2.shouldPushGenerationBaseTag = shouldPushGenerationBaseTag;
|
|
582075
582138
|
exports2.resolveBranchAction = resolveBranchAction;
|
|
582139
|
+
exports2.buildChangelogFileContents = buildChangelogFileContents;
|
|
582140
|
+
exports2.resolveChangelogUrl = resolveChangelogUrl;
|
|
582076
582141
|
var core_utils_1 = (init_lib4(), __toCommonJS(lib_exports));
|
|
582077
582142
|
var github_1 = (init_lib11(), __toCommonJS(lib_exports4));
|
|
582078
582143
|
var rest_1 = (init_dist_src9(), __toCommonJS(dist_src_exports));
|
|
@@ -582173,11 +582238,16 @@ var require_GithubStep = __commonJS({
|
|
|
582173
582238
|
throw new Error(`Unexpected branch action: ${String(_exhaustive)}`);
|
|
582174
582239
|
}
|
|
582175
582240
|
}
|
|
582241
|
+
const createdChangelog = await this.ensureChangelogFile(resolved);
|
|
582176
582242
|
if (!skipCommit) {
|
|
582177
582243
|
await this.ensureFernignore();
|
|
582178
582244
|
this.logger.debug("Committing changes...");
|
|
582179
582245
|
await repository.commitAllChanges(resolved.commitMessage);
|
|
582180
582246
|
this.logger.debug(`Committed changes to local copy of GitHub repository at ${this.outputDir}`);
|
|
582247
|
+
} else if (createdChangelog) {
|
|
582248
|
+
this.logger.debug("Committing reconstructed changelog.md on top of the replay commit...");
|
|
582249
|
+
await repository.add("changelog.md");
|
|
582250
|
+
await repository.commit(resolved.commitMessage);
|
|
582181
582251
|
}
|
|
582182
582252
|
if (shouldCheckNoDiff(this.config)) {
|
|
582183
582253
|
const noDiff = await repository.treeHashEquals(`origin/${baseBranch}`);
|
|
@@ -582218,7 +582288,18 @@ var require_GithubStep = __commonJS({
|
|
|
582218
582288
|
}
|
|
582219
582289
|
}
|
|
582220
582290
|
const headSha = await repository.getHeadSha();
|
|
582221
|
-
const
|
|
582291
|
+
const changelogCommitted = (await repository.listTrackedFiles()).includes("changelog.md");
|
|
582292
|
+
const changelogUrl = resolveChangelogUrl({
|
|
582293
|
+
changelogEntry: resolved.changelogEntry,
|
|
582294
|
+
changelogCommitted,
|
|
582295
|
+
remote,
|
|
582296
|
+
owner,
|
|
582297
|
+
repo,
|
|
582298
|
+
headSha
|
|
582299
|
+
});
|
|
582300
|
+
if (resolved.changelogEntry && !changelogCommitted) {
|
|
582301
|
+
this.logger.warn('changelog.md is not present in the committed tree; omitting the "See full changelog" link.');
|
|
582302
|
+
}
|
|
582222
582303
|
const { prTitle, prBody } = (0, parseCommitMessage_1.parseCommitMessageForPR)(resolved.commitMessage, resolved.changelogEntry, resolved.prDescription, resolved.versionBumpReason, resolved.previousVersion, resolved.newVersion, resolved.versionBump, changelogUrl);
|
|
582223
582304
|
const replaySection = (0, replay_summary_1.formatReplayPrBody)(replayResult, { branchName: prBranch, repoUri: this.config.uri });
|
|
582224
582305
|
let enrichedBody = replaySection != null ? prBody + "\n\n---\n\n" + replaySection : prBody;
|
|
@@ -582284,6 +582365,7 @@ var require_GithubStep = __commonJS({
|
|
|
582284
582365
|
this.logger.debug(`Checking out branch ${this.config.branch}`);
|
|
582285
582366
|
await repository.checkout(this.config.branch);
|
|
582286
582367
|
}
|
|
582368
|
+
await this.ensureChangelogFile(resolved);
|
|
582287
582369
|
await this.ensureFernignore();
|
|
582288
582370
|
this.logger.debug("Committing changes...");
|
|
582289
582371
|
await repository.commitAllChanges(resolved.commitMessage);
|
|
@@ -582325,6 +582407,7 @@ var require_GithubStep = __commonJS({
|
|
|
582325
582407
|
this.logger.debug(`Checking out branch ${this.config.branch}`);
|
|
582326
582408
|
await repository.checkout(this.config.branch);
|
|
582327
582409
|
}
|
|
582410
|
+
await this.ensureChangelogFile(resolved);
|
|
582328
582411
|
await this.ensureFernignore();
|
|
582329
582412
|
this.logger.debug("Committing changes...");
|
|
582330
582413
|
await repository.commitAllChanges(resolved.commitMessage);
|
|
@@ -582400,6 +582483,33 @@ var require_GithubStep = __commonJS({
|
|
|
582400
582483
|
await (0, promises_1.writeFile)(fernignorePath, "# Specify files that shouldn't be modified by Fern\n", "utf-8");
|
|
582401
582484
|
}
|
|
582402
582485
|
}
|
|
582486
|
+
/**
|
|
582487
|
+
* Guarantees `changelog.md` is present in the output directory whenever a changelog entry
|
|
582488
|
+
* exists for this run, so the file lands in the committed tree that GithubStep pushes and the
|
|
582489
|
+
* "See full changelog" link resolves. AutoVersionStep normally writes this file via
|
|
582490
|
+
* `prependChangelogEntry`; this is a safety net for paths where that write never reached the
|
|
582491
|
+
* directory GithubStep commits (e.g. non-replay self-hosted generation), which previously left
|
|
582492
|
+
* the link pointing at a non-existent blob (404).
|
|
582493
|
+
*
|
|
582494
|
+
* Returns `true` when it created the file, `false` when the file already existed (or there is
|
|
582495
|
+
* no changelog entry to write).
|
|
582496
|
+
*/
|
|
582497
|
+
async ensureChangelogFile(resolved) {
|
|
582498
|
+
const entry = resolved.changelogEntry?.trim();
|
|
582499
|
+
if (entry == null || entry.length === 0) {
|
|
582500
|
+
return false;
|
|
582501
|
+
}
|
|
582502
|
+
const changelogPath = (0, path_1.join)(this.outputDir, "changelog.md");
|
|
582503
|
+
try {
|
|
582504
|
+
await (0, promises_1.access)(changelogPath);
|
|
582505
|
+
return false;
|
|
582506
|
+
} catch {
|
|
582507
|
+
const version7 = resolved.newVersion ?? resolved.previousVersion;
|
|
582508
|
+
await (0, promises_1.writeFile)(changelogPath, buildChangelogFileContents(entry, version7), "utf-8");
|
|
582509
|
+
this.logger.debug(`Wrote changelog.md${version7 != null ? ` for ${version7}` : ""}.`);
|
|
582510
|
+
return true;
|
|
582511
|
+
}
|
|
582512
|
+
}
|
|
582403
582513
|
deriveSkipCommit(replayResult) {
|
|
582404
582514
|
if (replayResult == null) {
|
|
582405
582515
|
return false;
|
|
@@ -582480,6 +582590,24 @@ _Fern Run ID: \`${config5.runId}\`_`;
|
|
|
582480
582590
|
}
|
|
582481
582591
|
return "create-from-head";
|
|
582482
582592
|
}
|
|
582593
|
+
function buildChangelogFileContents(entry, version7) {
|
|
582594
|
+
const trimmed2 = entry.trim();
|
|
582595
|
+
const now = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
582596
|
+
const header = version7 != null ? `## [${version7}] - ${now}
|
|
582597
|
+
` : `## ${now}
|
|
582598
|
+
`;
|
|
582599
|
+
return `# Changelog
|
|
582600
|
+
|
|
582601
|
+
${header}${trimmed2}
|
|
582602
|
+
|
|
582603
|
+
`;
|
|
582604
|
+
}
|
|
582605
|
+
function resolveChangelogUrl({ changelogEntry, changelogCommitted, remote, owner, repo, headSha }) {
|
|
582606
|
+
if (changelogEntry == null || changelogEntry.trim().length === 0 || !changelogCommitted) {
|
|
582607
|
+
return void 0;
|
|
582608
|
+
}
|
|
582609
|
+
return `https://${remote}/${owner}/${repo}/blob/${headSha}/changelog.md`;
|
|
582610
|
+
}
|
|
582483
582611
|
}
|
|
582484
582612
|
});
|
|
582485
582613
|
|
|
@@ -688959,7 +689087,7 @@ var AccessTokenPosthogManager = class {
|
|
|
688959
689087
|
properties: {
|
|
688960
689088
|
...event,
|
|
688961
689089
|
...event.properties,
|
|
688962
|
-
version: "5.67.
|
|
689090
|
+
version: "5.67.1",
|
|
688963
689091
|
usingAccessToken: true,
|
|
688964
689092
|
...getRunIdProperties()
|
|
688965
689093
|
}
|
|
@@ -689025,7 +689153,7 @@ var UserPosthogManager = class {
|
|
|
689025
689153
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
689026
689154
|
event: "CLI",
|
|
689027
689155
|
properties: {
|
|
689028
|
-
version: "5.67.
|
|
689156
|
+
version: "5.67.1",
|
|
689029
689157
|
...event,
|
|
689030
689158
|
...event.properties,
|
|
689031
689159
|
usingAccessToken: false,
|
|
@@ -870126,7 +870254,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
870126
870254
|
var LOGS_FOLDER_NAME = "logs";
|
|
870127
870255
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
870128
870256
|
function getCliSource() {
|
|
870129
|
-
const version7 = "5.67.
|
|
870257
|
+
const version7 = "5.67.1";
|
|
870130
870258
|
return `cli@${version7}`;
|
|
870131
870259
|
}
|
|
870132
870260
|
var DebugLogger = class {
|
|
@@ -902685,7 +902813,7 @@ var LegacyDocsPublisher = class {
|
|
|
902685
902813
|
previewId,
|
|
902686
902814
|
disableTemplates: void 0,
|
|
902687
902815
|
skipUpload,
|
|
902688
|
-
cliVersion: "5.67.
|
|
902816
|
+
cliVersion: "5.67.1",
|
|
902689
902817
|
loginCommand: "fern auth login"
|
|
902690
902818
|
});
|
|
902691
902819
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -956878,6 +957006,8 @@ async function runLocalGenerationForWorkspace({ token, projectConfig, workspace,
|
|
|
956878
957006
|
const packageName = getPackageNameFromGeneratorConfig(generatorInvocation);
|
|
956879
957007
|
const userAgentTemplate = getUserAgentTemplateFromGeneratorConfig(generatorInvocation);
|
|
956880
957008
|
version7 = version7 ?? await computeSemanticVersion({ packageName, generatorInvocation });
|
|
957009
|
+
const irLanguage = generatorInvocation.language ?? (0, import_autoversion4.extractLanguageFromGeneratorName)(generatorInvocation.name);
|
|
957010
|
+
const effectiveIrVersion = version7 != null && (0, import_autoversion4.isAutoVersion)(version7) ? (0, import_autoversion4.mapMagicVersionForLanguage)(import_autoversion4.MAGIC_VERSION, irLanguage) : version7;
|
|
956881
957011
|
const intermediateRepresentation = generateIntermediateRepresentation({
|
|
956882
957012
|
workspace: fernWorkspace,
|
|
956883
957013
|
audiences: generatorGroup.audiences,
|
|
@@ -956889,7 +957019,7 @@ async function runLocalGenerationForWorkspace({ token, projectConfig, workspace,
|
|
|
956889
957019
|
disabled: generatorInvocation.disableExamples
|
|
956890
957020
|
},
|
|
956891
957021
|
readme: generatorInvocation.readme,
|
|
956892
|
-
version:
|
|
957022
|
+
version: effectiveIrVersion,
|
|
956893
957023
|
packageName,
|
|
956894
957024
|
userAgentTemplate,
|
|
956895
957025
|
organization: projectConfig.organization,
|
|
@@ -957171,6 +957301,10 @@ async function getWorkspaceTempDir() {
|
|
|
957171
957301
|
});
|
|
957172
957302
|
}
|
|
957173
957303
|
function getPublishConfig2({ generatorInvocation, org, version: version7, userProvidedVersion, packageName, context: context3, generateTests }) {
|
|
957304
|
+
const publishLanguage = generatorInvocation.language ?? (0, import_autoversion4.extractLanguageFromGeneratorName)(generatorInvocation.name);
|
|
957305
|
+
const substituteAutoVersion = (candidate) => candidate != null && (0, import_autoversion4.isAutoVersion)(candidate) ? (0, import_autoversion4.mapMagicVersionForLanguage)(import_autoversion4.MAGIC_VERSION, publishLanguage) : candidate;
|
|
957306
|
+
const effectiveVersion = substituteAutoVersion(version7);
|
|
957307
|
+
const effectiveUserProvidedVersion = substituteAutoVersion(userProvidedVersion);
|
|
957174
957308
|
if (generatorInvocation.raw?.github != null && isGithubSelfhosted2(generatorInvocation.raw.github)) {
|
|
957175
957309
|
const parsed = parseRepository(generatorInvocation.raw.github.uri);
|
|
957176
957310
|
const irMode = generatorInvocation.raw.github.mode === "pull-request" ? "pull-request" : void 0;
|
|
@@ -957181,35 +957315,39 @@ function getPublishConfig2({ generatorInvocation, org, version: version7, userPr
|
|
|
957181
957315
|
token: generatorInvocation.raw.github.token,
|
|
957182
957316
|
mode: irMode,
|
|
957183
957317
|
branch: generatorInvocation.raw.github.branch,
|
|
957184
|
-
target: getPublishTarget({
|
|
957318
|
+
target: getPublishTarget({
|
|
957319
|
+
outputSchema: generatorInvocation.raw.output,
|
|
957320
|
+
version: effectiveVersion,
|
|
957321
|
+
packageName
|
|
957322
|
+
})
|
|
957185
957323
|
});
|
|
957186
957324
|
}
|
|
957187
957325
|
if (generatorInvocation.raw?.output?.location === "local-file-system") {
|
|
957188
957326
|
let publishTarget = void 0;
|
|
957189
957327
|
if (generatorInvocation.language === "python") {
|
|
957190
957328
|
publishTarget = PublishTarget.pypi({
|
|
957191
|
-
version:
|
|
957329
|
+
version: effectiveVersion,
|
|
957192
957330
|
packageName
|
|
957193
957331
|
});
|
|
957194
|
-
context3.logger.debug(`Created PyPiPublishTarget: version ${
|
|
957332
|
+
context3.logger.debug(`Created PyPiPublishTarget: version ${effectiveVersion} package name: ${packageName}`);
|
|
957195
957333
|
} else if (generatorInvocation.language === "typescript") {
|
|
957196
|
-
if (
|
|
957334
|
+
if (effectiveUserProvidedVersion != null) {
|
|
957197
957335
|
const tsPackageName = packageName ?? (typeof generatorInvocation.raw?.config === "object" && generatorInvocation.raw?.config !== null ? generatorInvocation.raw.config.packageJson?.name : void 0);
|
|
957198
957336
|
publishTarget = PublishTarget.npm({
|
|
957199
|
-
version:
|
|
957337
|
+
version: effectiveUserProvidedVersion,
|
|
957200
957338
|
packageName: tsPackageName,
|
|
957201
957339
|
tokenEnvironmentVariable: ""
|
|
957202
957340
|
});
|
|
957203
|
-
context3.logger.debug(`Created NpmPublishTarget: version ${
|
|
957341
|
+
context3.logger.debug(`Created NpmPublishTarget: version ${effectiveUserProvidedVersion} package name: ${tsPackageName}`);
|
|
957204
957342
|
}
|
|
957205
957343
|
} else if (generatorInvocation.language === "rust") {
|
|
957206
957344
|
publishTarget = PublishTarget.crates({
|
|
957207
|
-
version:
|
|
957345
|
+
version: effectiveVersion,
|
|
957208
957346
|
packageName
|
|
957209
957347
|
});
|
|
957210
|
-
context3.logger.debug(`Created CratesPublishTarget: version ${
|
|
957348
|
+
context3.logger.debug(`Created CratesPublishTarget: version ${effectiveVersion} package name: ${packageName}`);
|
|
957211
957349
|
} else if (generatorInvocation.language === "go") {
|
|
957212
|
-
if (
|
|
957350
|
+
if (effectiveUserProvidedVersion != null) {
|
|
957213
957351
|
const goModulePath = (() => {
|
|
957214
957352
|
const config5 = generatorInvocation.raw?.config;
|
|
957215
957353
|
if (typeof config5 !== "object" || config5 === null) {
|
|
@@ -957222,10 +957360,10 @@ function getPublishConfig2({ generatorInvocation, org, version: version7, userPr
|
|
|
957222
957360
|
return module4.path;
|
|
957223
957361
|
})();
|
|
957224
957362
|
publishTarget = PublishTarget.go({
|
|
957225
|
-
version:
|
|
957363
|
+
version: effectiveUserProvidedVersion,
|
|
957226
957364
|
modulePath: goModulePath
|
|
957227
957365
|
});
|
|
957228
|
-
context3.logger.debug(`Created GoPublishTarget: version ${
|
|
957366
|
+
context3.logger.debug(`Created GoPublishTarget: version ${effectiveUserProvidedVersion} module path: ${goModulePath}`);
|
|
957229
957367
|
}
|
|
957230
957368
|
} else if (generatorInvocation.language === "java") {
|
|
957231
957369
|
const config5 = generatorInvocation.raw?.config;
|
|
@@ -957251,7 +957389,7 @@ function getPublishConfig2({ generatorInvocation, org, version: version7, userPr
|
|
|
957251
957389
|
})();
|
|
957252
957390
|
const coordinate = mavenCoordinate ? `${mavenCoordinate.groupId}:${mavenCoordinate.artifactId}` : void 0;
|
|
957253
957391
|
if (coordinate) {
|
|
957254
|
-
const mavenVersion =
|
|
957392
|
+
const mavenVersion = effectiveVersion ?? "0.0.0";
|
|
957255
957393
|
publishTarget = PublishTarget.maven({
|
|
957256
957394
|
coordinate,
|
|
957257
957395
|
version: mavenVersion,
|
|
@@ -969014,7 +969152,7 @@ function getAutomationContextFromEnv() {
|
|
|
969014
969152
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
969015
969153
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
969016
969154
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
969017
|
-
cli_version: "5.67.
|
|
969155
|
+
cli_version: "5.67.1"
|
|
969018
969156
|
};
|
|
969019
969157
|
}
|
|
969020
969158
|
function isAutomationMode() {
|
|
@@ -969846,7 +969984,7 @@ var CliContext = class _CliContext {
|
|
|
969846
969984
|
if (false) {
|
|
969847
969985
|
this.logger.error("CLI_VERSION is not defined");
|
|
969848
969986
|
}
|
|
969849
|
-
return "5.67.
|
|
969987
|
+
return "5.67.1";
|
|
969850
969988
|
}
|
|
969851
969989
|
getCliName() {
|
|
969852
969990
|
if (false) {
|
package/package.json
CHANGED