@fern-api/fern-api-dev 5.89.5 → 5.90.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/cli.cjs +151 -38
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -32839,19 +32839,57 @@ var init_mediaType = __esm({
|
|
|
32839
32839
|
|
|
32840
32840
|
// ../../commons/core-utils/lib/mergeWithOverrides.js
|
|
32841
32841
|
function mergeWithOverrides({ data: data2, overrides, allowNullKeys }) {
|
|
32842
|
-
const merged = mergeWith_default(data2, mergeWith_default, overrides,
|
|
32843
|
-
// nested arrays of objects are merged
|
|
32844
|
-
void 0
|
|
32845
|
-
) : (
|
|
32846
|
-
// nested arrays of primitives are replaced
|
|
32847
|
-
[...src]
|
|
32848
|
-
) : void 0);
|
|
32842
|
+
const merged = mergeWith_default(data2, mergeWith_default, overrides, overridesCustomizer);
|
|
32849
32843
|
const filtered = omitDeepBy(merged, isNull_default, {
|
|
32850
32844
|
ancestorKeys: allowNullKeys ?? [],
|
|
32851
32845
|
allowOmissionCursor: false
|
|
32852
32846
|
});
|
|
32853
32847
|
return filtered;
|
|
32854
32848
|
}
|
|
32849
|
+
function overridesCustomizer(obj, src) {
|
|
32850
|
+
if (!Array.isArray(obj) || !Array.isArray(src)) {
|
|
32851
|
+
return void 0;
|
|
32852
|
+
}
|
|
32853
|
+
if (!src.every((element4) => typeof element4 === "object") || !obj.every((element4) => typeof element4 === "object")) {
|
|
32854
|
+
return [...src];
|
|
32855
|
+
}
|
|
32856
|
+
return mergeParametersByIdentity(obj, src) ?? void 0;
|
|
32857
|
+
}
|
|
32858
|
+
function isParameterEntry(value2) {
|
|
32859
|
+
if (!isPlainObject_default(value2)) {
|
|
32860
|
+
return false;
|
|
32861
|
+
}
|
|
32862
|
+
const { name: name2, in: location2 } = value2;
|
|
32863
|
+
return typeof name2 === "string" && typeof location2 === "string";
|
|
32864
|
+
}
|
|
32865
|
+
function identityOf(entry) {
|
|
32866
|
+
return `${entry.in}:${entry.name}`;
|
|
32867
|
+
}
|
|
32868
|
+
function mergeParametersByIdentity(obj, src) {
|
|
32869
|
+
if (!obj.every(isParameterEntry) || !src.every(isParameterEntry)) {
|
|
32870
|
+
return void 0;
|
|
32871
|
+
}
|
|
32872
|
+
const unmatchedIndices = /* @__PURE__ */ new Map();
|
|
32873
|
+
obj.forEach((entry, index3) => {
|
|
32874
|
+
const indices = unmatchedIndices.get(identityOf(entry));
|
|
32875
|
+
if (indices != null) {
|
|
32876
|
+
indices.push(index3);
|
|
32877
|
+
} else {
|
|
32878
|
+
unmatchedIndices.set(identityOf(entry), [index3]);
|
|
32879
|
+
}
|
|
32880
|
+
});
|
|
32881
|
+
const merged = [...obj];
|
|
32882
|
+
for (const override of src) {
|
|
32883
|
+
const identity5 = identityOf(override);
|
|
32884
|
+
const matchIndex = unmatchedIndices.get(identity5)?.shift();
|
|
32885
|
+
if (matchIndex == null) {
|
|
32886
|
+
merged.push(override);
|
|
32887
|
+
continue;
|
|
32888
|
+
}
|
|
32889
|
+
merged[matchIndex] = mergeWith_default(obj[matchIndex], override, overridesCustomizer);
|
|
32890
|
+
}
|
|
32891
|
+
return merged;
|
|
32892
|
+
}
|
|
32855
32893
|
var omitDeepBy;
|
|
32856
32894
|
var init_mergeWithOverrides = __esm({
|
|
32857
32895
|
"../../commons/core-utils/lib/mergeWithOverrides.js"() {
|
|
@@ -118352,7 +118390,8 @@ var init_DocsYmlSchemas = __esm({
|
|
|
118352
118390
|
});
|
|
118353
118391
|
GitLibraryInputSchema = external_exports.object({
|
|
118354
118392
|
git: external_exports.string(),
|
|
118355
|
-
subpath: external_exports.string().optional()
|
|
118393
|
+
subpath: external_exports.string().optional(),
|
|
118394
|
+
ref: external_exports.string().optional()
|
|
118356
118395
|
});
|
|
118357
118396
|
PathLibraryInputSchema = external_exports.object({
|
|
118358
118397
|
path: external_exports.string()
|
|
@@ -123729,7 +123768,8 @@ var init_GitLibraryInputSchema2 = __esm({
|
|
|
123729
123768
|
init_core5();
|
|
123730
123769
|
GitLibraryInputSchema2 = schemas_exports6.object({
|
|
123731
123770
|
git: schemas_exports6.string(),
|
|
123732
|
-
subpath: schemas_exports6.string().optional()
|
|
123771
|
+
subpath: schemas_exports6.string().optional(),
|
|
123772
|
+
ref: schemas_exports6.string().optional()
|
|
123733
123773
|
});
|
|
123734
123774
|
}
|
|
123735
123775
|
});
|
|
@@ -165758,7 +165798,7 @@ function convertParameters({ path: path120, httpMethod, parameters: parameters2,
|
|
|
165758
165798
|
const convertedParameter = {
|
|
165759
165799
|
name: resolvedParameter.name,
|
|
165760
165800
|
schema,
|
|
165761
|
-
description: resolvedParameter
|
|
165801
|
+
description: getParameterDescription(resolvedParameter),
|
|
165762
165802
|
parameterNameOverride: getParameterName(resolvedParameter),
|
|
165763
165803
|
availability,
|
|
165764
165804
|
source: source2,
|
|
@@ -165787,6 +165827,15 @@ function convertParameters({ path: path120, httpMethod, parameters: parameters2,
|
|
|
165787
165827
|
}
|
|
165788
165828
|
return convertedParameters;
|
|
165789
165829
|
}
|
|
165830
|
+
function getParameterDescription(parameter6) {
|
|
165831
|
+
if (parameter6.description != null) {
|
|
165832
|
+
return parameter6.description;
|
|
165833
|
+
}
|
|
165834
|
+
if (parameter6.schema == null || isReferenceObject(parameter6.schema)) {
|
|
165835
|
+
return void 0;
|
|
165836
|
+
}
|
|
165837
|
+
return parameter6.schema.description;
|
|
165838
|
+
}
|
|
165790
165839
|
function getExplodeForQueryParameter(parameter6) {
|
|
165791
165840
|
const style2 = parameter6.style ?? "form";
|
|
165792
165841
|
const explode = parameter6.explode;
|
|
@@ -235585,7 +235634,7 @@ function parseLibrariesConfiguration(libraries) {
|
|
|
235585
235634
|
}
|
|
235586
235635
|
const result = {};
|
|
235587
235636
|
for (const [name2, config5] of Object.entries(libraries)) {
|
|
235588
|
-
const input3 = isGitLibraryInput(config5.input) ? { type: "git", git: config5.input.git, subpath: config5.input.subpath } : { type: "path", path: config5.input.path };
|
|
235637
|
+
const input3 = isGitLibraryInput(config5.input) ? { type: "git", git: config5.input.git, subpath: config5.input.subpath, ref: config5.input.ref } : { type: "path", path: config5.input.path };
|
|
235589
235638
|
result[name2] = {
|
|
235590
235639
|
input: input3,
|
|
235591
235640
|
output: {
|
|
@@ -568242,6 +568291,7 @@ var require_VersionUtils = __commonJS({
|
|
|
568242
568291
|
exports2.maxVersionBump = maxVersionBump3;
|
|
568243
568292
|
exports2.isAutoVersion = isAutoVersion5;
|
|
568244
568293
|
exports2.isValidSemver = isValidSemver;
|
|
568294
|
+
exports2.isPlaceholderVersion = isPlaceholderVersion2;
|
|
568245
568295
|
exports2.incrementVersion = incrementVersion;
|
|
568246
568296
|
exports2.extractPreviousVersionFromDiffLine = extractPreviousVersionFromDiffLine;
|
|
568247
568297
|
var semver_1 = __importDefault2(require_semver2());
|
|
@@ -568321,11 +568371,18 @@ var require_VersionUtils = __commonJS({
|
|
|
568321
568371
|
function isValidSemver(version7) {
|
|
568322
568372
|
return SEMVER_PATTERN.test(version7);
|
|
568323
568373
|
}
|
|
568374
|
+
function isPlaceholderVersion2(version7) {
|
|
568375
|
+
const withoutPrefix = version7.startsWith("v") ? version7.slice(1) : version7;
|
|
568376
|
+
return withoutPrefix === exports2.MAGIC_VERSION || withoutPrefix.startsWith(`${exports2.MAGIC_VERSION}.`) || withoutPrefix === exports2.MAGIC_VERSION_PYTHON || withoutPrefix.startsWith(`${exports2.MAGIC_VERSION_PYTHON}.`);
|
|
568377
|
+
}
|
|
568324
568378
|
function incrementVersion(currentVersion, versionBump) {
|
|
568325
568379
|
const matcher = currentVersion.match(SEMVER_PATTERN);
|
|
568326
568380
|
if (!matcher) {
|
|
568327
568381
|
throw new AutoVersioningService_js_1.AutoVersioningException("Invalid semantic version format: " + currentVersion);
|
|
568328
568382
|
}
|
|
568383
|
+
if (isPlaceholderVersion2(currentVersion)) {
|
|
568384
|
+
throw new AutoVersioningService_js_1.AutoVersioningException("Refusing to increment the magic placeholder version: " + currentVersion + ". A real previous version must be resolved first.");
|
|
568385
|
+
}
|
|
568329
568386
|
const prefix2 = matcher[1] ?? "";
|
|
568330
568387
|
const versionWithoutPrefix = currentVersion.slice(prefix2.length);
|
|
568331
568388
|
const preRelease = matcher[5];
|
|
@@ -568366,7 +568423,7 @@ var require_autoversion = __commonJS({
|
|
|
568366
568423
|
"../../generator-cli/lib/autoversion/index.js"(exports2) {
|
|
568367
568424
|
"use strict";
|
|
568368
568425
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
568369
|
-
exports2.VersionBump = exports2.maxVersionBump = exports2.mapMagicVersionForLanguage = exports2.MAX_RAW_DIFF_BYTES = exports2.MAX_CHUNKS = exports2.MAX_AI_DIFF_BYTES = exports2.MAGIC_VERSION_PYTHON = exports2.MAGIC_VERSION = exports2.isValidSemver = exports2.isAutoVersion = exports2.incrementVersion = exports2.extractPreviousVersionFromDiffLine = exports2.extractLanguageFromGeneratorName = exports2.AUTO_VERSION = exports2.prependChangelogBlock = exports2.changelogContainsVersion = exports2.formatSizeKB = exports2.countFilesInDiff = exports2.AutoVersioningService = exports2.AutoVersioningException = exports2.AutoVersioningCache = void 0;
|
|
568426
|
+
exports2.VersionBump = exports2.maxVersionBump = exports2.mapMagicVersionForLanguage = exports2.MAX_RAW_DIFF_BYTES = exports2.MAX_CHUNKS = exports2.MAX_AI_DIFF_BYTES = exports2.MAGIC_VERSION_PYTHON = exports2.MAGIC_VERSION = exports2.isValidSemver = exports2.isPlaceholderVersion = exports2.isAutoVersion = exports2.incrementVersion = exports2.extractPreviousVersionFromDiffLine = exports2.extractLanguageFromGeneratorName = exports2.AUTO_VERSION = exports2.prependChangelogBlock = exports2.changelogContainsVersion = exports2.formatSizeKB = exports2.countFilesInDiff = exports2.AutoVersioningService = exports2.AutoVersioningException = exports2.AutoVersioningCache = void 0;
|
|
568370
568427
|
var AutoVersioningCache_js_1 = require_AutoVersioningCache();
|
|
568371
568428
|
Object.defineProperty(exports2, "AutoVersioningCache", { enumerable: true, get: function() {
|
|
568372
568429
|
return AutoVersioningCache_js_1.AutoVersioningCache;
|
|
@@ -568407,6 +568464,9 @@ var require_autoversion = __commonJS({
|
|
|
568407
568464
|
Object.defineProperty(exports2, "isAutoVersion", { enumerable: true, get: function() {
|
|
568408
568465
|
return VersionUtils_js_1.isAutoVersion;
|
|
568409
568466
|
} });
|
|
568467
|
+
Object.defineProperty(exports2, "isPlaceholderVersion", { enumerable: true, get: function() {
|
|
568468
|
+
return VersionUtils_js_1.isPlaceholderVersion;
|
|
568469
|
+
} });
|
|
568410
568470
|
Object.defineProperty(exports2, "isValidSemver", { enumerable: true, get: function() {
|
|
568411
568471
|
return VersionUtils_js_1.isValidSemver;
|
|
568412
568472
|
} });
|
|
@@ -569237,7 +569297,8 @@ var require_AutoVersionStep = __commonJS({
|
|
|
569237
569297
|
}
|
|
569238
569298
|
async handleFirstGeneration(params2) {
|
|
569239
569299
|
const { service, language, mappedMagicVersion, commit } = params2;
|
|
569240
|
-
const
|
|
569300
|
+
const configuredBaseVersion = this.usableVersion(this.config.baseVersion, "baseVersion");
|
|
569301
|
+
const initialVersion = configuredBaseVersion ?? (mappedMagicVersion.startsWith("v") ? "v0.0.1" : "0.0.1");
|
|
569241
569302
|
if (!(0, index_1.isValidSemver)(initialVersion)) {
|
|
569242
569303
|
const errorMessage = `AutoVersionStep: baseVersion ${JSON.stringify(initialVersion)} is not a valid semver string (expected e.g. "1.2.3" or "v1.2.3"). Refusing to run.`;
|
|
569243
569304
|
this.logger.error(errorMessage);
|
|
@@ -569547,12 +569608,13 @@ var require_AutoVersionStep = __commonJS({
|
|
|
569547
569608
|
*/
|
|
569548
569609
|
async resolvePreviousVersionNonReplay(params2) {
|
|
569549
569610
|
const { service, rawDiff, mappedMagicVersion, baseVersion } = params2;
|
|
569550
|
-
|
|
569551
|
-
|
|
569552
|
-
|
|
569611
|
+
const usableBaseVersion = this.usableVersion(baseVersion, "baseVersion");
|
|
569612
|
+
if (usableBaseVersion != null && (0, index_1.isValidSemver)(usableBaseVersion)) {
|
|
569613
|
+
this.logger.debug(`AutoVersionStep (non-replay): previous version from pipeline baseVersion: ${usableBaseVersion}`);
|
|
569614
|
+
return this.normalizeVersionPrefix(usableBaseVersion, mappedMagicVersion);
|
|
569553
569615
|
}
|
|
569554
569616
|
try {
|
|
569555
|
-
const extracted = service.extractPreviousVersion(rawDiff, mappedMagicVersion);
|
|
569617
|
+
const extracted = this.usableVersion(service.extractPreviousVersion(rawDiff, mappedMagicVersion) ?? void 0, "diff");
|
|
569556
569618
|
if (extracted != null) {
|
|
569557
569619
|
this.logger.debug(`AutoVersionStep (non-replay): previous version from diff: ${extracted}`);
|
|
569558
569620
|
return extracted;
|
|
@@ -569563,12 +569625,12 @@ var require_AutoVersionStep = __commonJS({
|
|
|
569563
569625
|
}
|
|
569564
569626
|
this.logger.info("AutoVersionStep (non-replay): magic version not in diff; trying metadata + git tags.");
|
|
569565
569627
|
}
|
|
569566
|
-
const metadataVersion = this.readVersionFromMetadataAtHead();
|
|
569628
|
+
const metadataVersion = this.usableVersion(this.readVersionFromMetadataAtHead(), "metadata.json");
|
|
569567
569629
|
if (metadataVersion != null) {
|
|
569568
569630
|
return this.normalizeVersionPrefix(metadataVersion, mappedMagicVersion);
|
|
569569
569631
|
}
|
|
569570
569632
|
try {
|
|
569571
|
-
const tagVersion = await service.getLatestVersionFromGitTags(this.outputDir);
|
|
569633
|
+
const tagVersion = this.usableVersion(await service.getLatestVersionFromGitTags(this.outputDir) ?? void 0, "git tags");
|
|
569572
569634
|
if (tagVersion != null) {
|
|
569573
569635
|
return this.normalizeVersionPrefix(tagVersion, mappedMagicVersion);
|
|
569574
569636
|
}
|
|
@@ -569579,12 +569641,13 @@ var require_AutoVersionStep = __commonJS({
|
|
|
569579
569641
|
}
|
|
569580
569642
|
async resolvePreviousVersion(params2) {
|
|
569581
569643
|
const { service, rawDiff, mappedMagicVersion, baseVersion } = params2;
|
|
569582
|
-
|
|
569583
|
-
|
|
569584
|
-
|
|
569644
|
+
const usableBaseVersion = this.usableVersion(baseVersion, "baseVersion");
|
|
569645
|
+
if (usableBaseVersion != null && (0, index_1.isValidSemver)(usableBaseVersion)) {
|
|
569646
|
+
this.logger.debug(`AutoVersionStep: previous version from pipeline baseVersion: ${usableBaseVersion}`);
|
|
569647
|
+
return this.normalizeVersionPrefix(usableBaseVersion, mappedMagicVersion);
|
|
569585
569648
|
}
|
|
569586
569649
|
try {
|
|
569587
|
-
const extracted = service.extractPreviousVersion(rawDiff, mappedMagicVersion);
|
|
569650
|
+
const extracted = this.usableVersion(service.extractPreviousVersion(rawDiff, mappedMagicVersion) ?? void 0, "diff");
|
|
569588
569651
|
if (extracted != null) {
|
|
569589
569652
|
this.logger.debug(`AutoVersionStep: previous version from diff: ${extracted}`);
|
|
569590
569653
|
return extracted;
|
|
@@ -569595,12 +569658,12 @@ var require_AutoVersionStep = __commonJS({
|
|
|
569595
569658
|
}
|
|
569596
569659
|
this.logger.info("AutoVersionStep: magic version not found in diff; falling back to metadata + git tags.");
|
|
569597
569660
|
}
|
|
569598
|
-
const metadataVersion = await this.readVersionFromMetadata();
|
|
569661
|
+
const metadataVersion = this.usableVersion(await this.readVersionFromMetadata(), "metadata.json");
|
|
569599
569662
|
if (metadataVersion != null) {
|
|
569600
569663
|
return this.normalizeVersionPrefix(metadataVersion, mappedMagicVersion);
|
|
569601
569664
|
}
|
|
569602
569665
|
try {
|
|
569603
|
-
const tagVersion = await service.getLatestVersionFromGitTags(this.outputDir);
|
|
569666
|
+
const tagVersion = this.usableVersion(await service.getLatestVersionFromGitTags(this.outputDir) ?? void 0, "git tags");
|
|
569604
569667
|
if (tagVersion != null) {
|
|
569605
569668
|
return this.normalizeVersionPrefix(tagVersion, mappedMagicVersion);
|
|
569606
569669
|
}
|
|
@@ -569622,6 +569685,25 @@ var require_AutoVersionStep = __commonJS({
|
|
|
569622
569685
|
return void 0;
|
|
569623
569686
|
}
|
|
569624
569687
|
}
|
|
569688
|
+
/**
|
|
569689
|
+
* Drops candidate previous versions that are the magic placeholder. SDK repos
|
|
569690
|
+
* that derive their published version at release time keep the placeholder
|
|
569691
|
+
* committed, so every resolution source (baseVersion, diff extraction,
|
|
569692
|
+
* metadata.json, git tags) can hand back the sentinel; incrementing it would
|
|
569693
|
+
* emit a mutated placeholder such as `0.0.0-fern-placeholder.0` instead of a
|
|
569694
|
+
* real version. Returning undefined lets the caller fall through to the next
|
|
569695
|
+
* source, and ultimately to the first-generation path.
|
|
569696
|
+
*/
|
|
569697
|
+
usableVersion(version7, source2) {
|
|
569698
|
+
if (version7 == null) {
|
|
569699
|
+
return void 0;
|
|
569700
|
+
}
|
|
569701
|
+
if ((0, index_1.isPlaceholderVersion)(version7)) {
|
|
569702
|
+
this.logger.info(`AutoVersionStep: ignoring placeholder version ${version7} from ${source2}; trying the next previous-version source.`);
|
|
569703
|
+
return void 0;
|
|
569704
|
+
}
|
|
569705
|
+
return version7;
|
|
569706
|
+
}
|
|
569625
569707
|
normalizeVersionPrefix(version7, mappedMagicVersion) {
|
|
569626
569708
|
const stripped = version7.startsWith("v") ? version7.slice(1) : version7;
|
|
569627
569709
|
return mappedMagicVersion.startsWith("v") ? `v${stripped}` : stripped;
|
|
@@ -694418,7 +694500,7 @@ var AccessTokenPosthogManager = class {
|
|
|
694418
694500
|
properties: {
|
|
694419
694501
|
...event,
|
|
694420
694502
|
...event.properties,
|
|
694421
|
-
version: "5.
|
|
694503
|
+
version: "5.90.0",
|
|
694422
694504
|
usingAccessToken: true,
|
|
694423
694505
|
...getRunIdProperties()
|
|
694424
694506
|
}
|
|
@@ -694484,7 +694566,7 @@ var UserPosthogManager = class {
|
|
|
694484
694566
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
694485
694567
|
event: "CLI",
|
|
694486
694568
|
properties: {
|
|
694487
|
-
version: "5.
|
|
694569
|
+
version: "5.90.0",
|
|
694488
694570
|
...event,
|
|
694489
694571
|
...event.properties,
|
|
694490
694572
|
usingAccessToken: false,
|
|
@@ -875614,7 +875696,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
875614
875696
|
var LOGS_FOLDER_NAME = "logs";
|
|
875615
875697
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
875616
875698
|
function getCliSource() {
|
|
875617
|
-
const version7 = "5.
|
|
875699
|
+
const version7 = "5.90.0";
|
|
875618
875700
|
return `cli@${version7}`;
|
|
875619
875701
|
}
|
|
875620
875702
|
var DebugLogger = class {
|
|
@@ -896131,13 +896213,14 @@ async function generateIrRemotely({ client: client3, name: name2, config: config
|
|
|
896131
896213
|
}
|
|
896132
896214
|
const gitInput = config5.input;
|
|
896133
896215
|
const jobId = await wrapStep({
|
|
896134
|
-
message: `Library '${name2}': starting generation from ${gitInput.git}`,
|
|
896216
|
+
message: `Library '${name2}': starting generation from ${gitInput.git}${gitInput.ref != null ? ` (ref: ${gitInput.ref})` : ""}`,
|
|
896135
896217
|
operation: () => startGeneration(client3, {
|
|
896136
896218
|
name: name2,
|
|
896137
896219
|
orgId,
|
|
896138
896220
|
githubUrl: gitInput.git,
|
|
896139
896221
|
language,
|
|
896140
896222
|
packagePath: gitInput.subpath,
|
|
896223
|
+
ref: gitInput.ref,
|
|
896141
896224
|
doxyfileContent
|
|
896142
896225
|
})
|
|
896143
896226
|
});
|
|
@@ -896172,7 +896255,8 @@ async function startGeneration(client3, opts) {
|
|
|
896172
896255
|
githubUrl: opts.githubUrl,
|
|
896173
896256
|
language: opts.language,
|
|
896174
896257
|
config: {
|
|
896175
|
-
branch
|
|
896258
|
+
// FDR's library-docs API accepts any git ref (branch, tag, or SHA) via `branch`.
|
|
896259
|
+
branch: opts.ref,
|
|
896176
896260
|
packagePath: opts.packagePath,
|
|
896177
896261
|
title: opts.name,
|
|
896178
896262
|
slug: opts.name,
|
|
@@ -898336,6 +898420,17 @@ var definitions6 = {
|
|
|
898336
898420
|
}
|
|
898337
898421
|
],
|
|
898338
898422
|
description: "Optional path within the repository to the library source.\nExample: django/core"
|
|
898423
|
+
},
|
|
898424
|
+
ref: {
|
|
898425
|
+
oneOf: [
|
|
898426
|
+
{
|
|
898427
|
+
type: "string"
|
|
898428
|
+
},
|
|
898429
|
+
{
|
|
898430
|
+
type: "null"
|
|
898431
|
+
}
|
|
898432
|
+
],
|
|
898433
|
+
description: "Git ref (branch, tag, or commit SHA) to check out.\nDefaults to the repository's default branch when omitted.\nExample: feature/my-fix"
|
|
898339
898434
|
}
|
|
898340
898435
|
},
|
|
898341
898436
|
required: [
|
|
@@ -908324,7 +908419,7 @@ var LegacyDocsPublisher = class {
|
|
|
908324
908419
|
previewId,
|
|
908325
908420
|
disableTemplates: void 0,
|
|
908326
908421
|
skipUpload,
|
|
908327
|
-
cliVersion: "5.
|
|
908422
|
+
cliVersion: "5.90.0",
|
|
908328
908423
|
loginCommand: "fern auth login"
|
|
908329
908424
|
});
|
|
908330
908425
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -961942,16 +962037,16 @@ var LocalTaskHandler = class {
|
|
|
961942
962037
|
}
|
|
961943
962038
|
let previousVersion;
|
|
961944
962039
|
try {
|
|
961945
|
-
previousVersion = autoVersioningService.extractPreviousVersion(diffContent, mappedMagicVersion);
|
|
962040
|
+
previousVersion = this.usableVersion(autoVersioningService.extractPreviousVersion(diffContent, mappedMagicVersion) ?? void 0, "diff");
|
|
961946
962041
|
} catch (e2) {
|
|
961947
962042
|
if (!(e2 instanceof import_autoversion2.AutoVersioningException) || !e2.magicVersionAbsent) {
|
|
961948
962043
|
throw e2;
|
|
961949
962044
|
}
|
|
961950
962045
|
this.context.logger.info(`Magic version not found in diff, trying fallbacks: ${e2}`);
|
|
961951
|
-
previousVersion = await this.getVersionFromLocalMetadata();
|
|
962046
|
+
previousVersion = this.usableVersion(await this.getVersionFromLocalMetadata(), "metadata.json");
|
|
961952
962047
|
if (previousVersion == null) {
|
|
961953
962048
|
const tagVersion = await autoVersioningService.getLatestVersionFromGitTags(this.absolutePathToLocalOutput);
|
|
961954
|
-
previousVersion = this.normalizeVersionPrefix(tagVersion);
|
|
962049
|
+
previousVersion = this.usableVersion(this.normalizeVersionPrefix(tagVersion), "git tags");
|
|
961955
962050
|
}
|
|
961956
962051
|
if (previousVersion == null) {
|
|
961957
962052
|
this.context.logger.info("No git tags found \u2014 treating as new SDK repository");
|
|
@@ -961971,10 +962066,10 @@ var LocalTaskHandler = class {
|
|
|
961971
962066
|
const cleanedFileCount = (0, import_autoversion2.countFilesInDiff)(cleanedDiff);
|
|
961972
962067
|
this.context.logger.debug(`Generated diff size: ${rawDiffSizeKB}KB (${diffContent.length} chars), ${rawFileCount} files changed. Cleaned diff size: ${cleanedDiffSizeKB}KB (${cleanedDiff.length} chars), ${cleanedFileCount} files remaining`);
|
|
961973
962068
|
if (previousVersion == null) {
|
|
961974
|
-
previousVersion = await this.getVersionFromLocalMetadata();
|
|
962069
|
+
previousVersion = this.usableVersion(await this.getVersionFromLocalMetadata(), "metadata.json");
|
|
961975
962070
|
if (previousVersion == null) {
|
|
961976
962071
|
const rawTagVersion = await autoVersioningService.getLatestVersionFromGitTags(this.absolutePathToLocalOutput);
|
|
961977
|
-
const normalizedTag = this.normalizeVersionPrefix(rawTagVersion);
|
|
962072
|
+
const normalizedTag = this.usableVersion(this.normalizeVersionPrefix(rawTagVersion), "git tags");
|
|
961978
962073
|
if (normalizedTag != null) {
|
|
961979
962074
|
this.context.logger.info(`No previous version from diff; using git tag: ${normalizedTag}`);
|
|
961980
962075
|
previousVersion = normalizedTag;
|
|
@@ -962244,6 +962339,24 @@ var LocalTaskHandler = class {
|
|
|
962244
962339
|
return void 0;
|
|
962245
962340
|
}
|
|
962246
962341
|
}
|
|
962342
|
+
/**
|
|
962343
|
+
* Drops candidate previous versions that are the magic placeholder. SDK repos
|
|
962344
|
+
* that derive their published version at release time keep the placeholder
|
|
962345
|
+
* committed, so any resolution source can hand back the sentinel; bumping it
|
|
962346
|
+
* would publish a mutated placeholder rather than a real version. Returning
|
|
962347
|
+
* undefined lets the caller fall through to the next source, and ultimately to
|
|
962348
|
+
* the initial-version path.
|
|
962349
|
+
*/
|
|
962350
|
+
usableVersion(version7, source2) {
|
|
962351
|
+
if (version7 == null) {
|
|
962352
|
+
return void 0;
|
|
962353
|
+
}
|
|
962354
|
+
if ((0, import_autoversion2.isPlaceholderVersion)(version7)) {
|
|
962355
|
+
this.context.logger.info(`Ignoring placeholder version ${version7} from ${source2}; trying the next previous-version source.`);
|
|
962356
|
+
return void 0;
|
|
962357
|
+
}
|
|
962358
|
+
return version7;
|
|
962359
|
+
}
|
|
962247
962360
|
/**
|
|
962248
962361
|
* Normalizes a version string's `v` prefix to match the convention used by
|
|
962249
962362
|
* the magic version for this generator's language. Git tags may use `v1.2.3`
|
|
@@ -975214,7 +975327,7 @@ function getAutomationContextFromEnv() {
|
|
|
975214
975327
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
975215
975328
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
975216
975329
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
975217
|
-
cli_version: "5.
|
|
975330
|
+
cli_version: "5.90.0"
|
|
975218
975331
|
};
|
|
975219
975332
|
}
|
|
975220
975333
|
function isAutomationMode() {
|
|
@@ -976046,7 +976159,7 @@ var CliContext = class _CliContext {
|
|
|
976046
976159
|
if (false) {
|
|
976047
976160
|
this.logger.error("CLI_VERSION is not defined");
|
|
976048
976161
|
}
|
|
976049
|
-
return "5.
|
|
976162
|
+
return "5.90.0";
|
|
976050
976163
|
}
|
|
976051
976164
|
getCliName() {
|
|
976052
976165
|
if (false) {
|
package/package.json
CHANGED