@fern-api/fern-api-dev 5.80.3 → 5.80.5
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 +238 -102
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -68076,6 +68076,13 @@ var init_NpmPublishTarget = __esm({
|
|
|
68076
68076
|
}
|
|
68077
68077
|
});
|
|
68078
68078
|
|
|
68079
|
+
// ../../ir-sdk/lib/sdk/api/resources/publish/types/NugetPublishTarget.js
|
|
68080
|
+
var init_NugetPublishTarget = __esm({
|
|
68081
|
+
"../../ir-sdk/lib/sdk/api/resources/publish/types/NugetPublishTarget.js"() {
|
|
68082
|
+
"use strict";
|
|
68083
|
+
}
|
|
68084
|
+
});
|
|
68085
|
+
|
|
68079
68086
|
// ../../ir-sdk/lib/sdk/api/resources/publish/types/PostmanPublishTarget.js
|
|
68080
68087
|
var init_PostmanPublishTarget = __esm({
|
|
68081
68088
|
"../../ir-sdk/lib/sdk/api/resources/publish/types/PostmanPublishTarget.js"() {
|
|
@@ -68194,6 +68201,15 @@ var init_PublishTarget = __esm({
|
|
|
68194
68201
|
}
|
|
68195
68202
|
};
|
|
68196
68203
|
},
|
|
68204
|
+
nuget: (value2) => {
|
|
68205
|
+
return {
|
|
68206
|
+
...value2,
|
|
68207
|
+
type: "nuget",
|
|
68208
|
+
_visit: function(visitor) {
|
|
68209
|
+
return PublishTarget._visit(this, visitor);
|
|
68210
|
+
}
|
|
68211
|
+
};
|
|
68212
|
+
},
|
|
68197
68213
|
_visit: (value2, visitor) => {
|
|
68198
68214
|
switch (value2.type) {
|
|
68199
68215
|
case "postman":
|
|
@@ -68208,6 +68224,8 @@ var init_PublishTarget = __esm({
|
|
|
68208
68224
|
return visitor.crates(value2);
|
|
68209
68225
|
case "go":
|
|
68210
68226
|
return visitor.go(value2);
|
|
68227
|
+
case "nuget":
|
|
68228
|
+
return visitor.nuget(value2);
|
|
68211
68229
|
default:
|
|
68212
68230
|
return visitor._other(value2);
|
|
68213
68231
|
}
|
|
@@ -68234,6 +68252,7 @@ var init_types65 = __esm({
|
|
|
68234
68252
|
init_GoPublishTarget();
|
|
68235
68253
|
init_MavenPublishTarget();
|
|
68236
68254
|
init_NpmPublishTarget();
|
|
68255
|
+
init_NugetPublishTarget();
|
|
68237
68256
|
init_PostmanPublishTarget();
|
|
68238
68257
|
init_PublishingConfig();
|
|
68239
68258
|
init_PublishTarget();
|
|
@@ -79849,6 +79868,19 @@ var init_NpmPublishTarget2 = __esm({
|
|
|
79849
79868
|
}
|
|
79850
79869
|
});
|
|
79851
79870
|
|
|
79871
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/publish/types/NugetPublishTarget.js
|
|
79872
|
+
var NugetPublishTarget;
|
|
79873
|
+
var init_NugetPublishTarget2 = __esm({
|
|
79874
|
+
"../../ir-sdk/lib/sdk/serialization/resources/publish/types/NugetPublishTarget.js"() {
|
|
79875
|
+
"use strict";
|
|
79876
|
+
init_core2();
|
|
79877
|
+
NugetPublishTarget = schemas_exports3.objectWithoutOptionalProperties({
|
|
79878
|
+
version: schemas_exports3.string().optional(),
|
|
79879
|
+
packageName: schemas_exports3.string().optional()
|
|
79880
|
+
});
|
|
79881
|
+
}
|
|
79882
|
+
});
|
|
79883
|
+
|
|
79852
79884
|
// ../../ir-sdk/lib/sdk/serialization/resources/publish/types/PostmanPublishTarget.js
|
|
79853
79885
|
var PostmanPublishTarget;
|
|
79854
79886
|
var init_PostmanPublishTarget2 = __esm({
|
|
@@ -79887,6 +79919,7 @@ var init_PublishTarget2 = __esm({
|
|
|
79887
79919
|
init_GoPublishTarget2();
|
|
79888
79920
|
init_MavenPublishTarget2();
|
|
79889
79921
|
init_NpmPublishTarget2();
|
|
79922
|
+
init_NugetPublishTarget2();
|
|
79890
79923
|
init_PostmanPublishTarget2();
|
|
79891
79924
|
init_PypiPublishTarget2();
|
|
79892
79925
|
PublishTarget2 = schemas_exports3.union("type", {
|
|
@@ -79895,7 +79928,8 @@ var init_PublishTarget2 = __esm({
|
|
|
79895
79928
|
maven: MavenPublishTarget,
|
|
79896
79929
|
pypi: PypiPublishTarget,
|
|
79897
79930
|
crates: CratesPublishTarget,
|
|
79898
|
-
go: GoPublishTarget
|
|
79931
|
+
go: GoPublishTarget,
|
|
79932
|
+
nuget: NugetPublishTarget
|
|
79899
79933
|
}).transform({
|
|
79900
79934
|
transform: (value2) => {
|
|
79901
79935
|
switch (value2.type) {
|
|
@@ -79911,6 +79945,8 @@ var init_PublishTarget2 = __esm({
|
|
|
79911
79945
|
return PublishTarget.crates(value2);
|
|
79912
79946
|
case "go":
|
|
79913
79947
|
return PublishTarget.go(value2);
|
|
79948
|
+
case "nuget":
|
|
79949
|
+
return PublishTarget.nuget(value2);
|
|
79914
79950
|
default:
|
|
79915
79951
|
return value2;
|
|
79916
79952
|
}
|
|
@@ -81954,6 +81990,7 @@ var init_types94 = __esm({
|
|
|
81954
81990
|
init_GoPublishTarget2();
|
|
81955
81991
|
init_MavenPublishTarget2();
|
|
81956
81992
|
init_NpmPublishTarget2();
|
|
81993
|
+
init_NugetPublishTarget2();
|
|
81957
81994
|
init_PostmanPublishTarget2();
|
|
81958
81995
|
init_PublishingConfig2();
|
|
81959
81996
|
init_PublishTarget2();
|
|
@@ -81971,6 +82008,7 @@ __export(publish_exports2, {
|
|
|
81971
82008
|
GoPublishTarget: () => GoPublishTarget,
|
|
81972
82009
|
MavenPublishTarget: () => MavenPublishTarget,
|
|
81973
82010
|
NpmPublishTarget: () => NpmPublishTarget,
|
|
82011
|
+
NugetPublishTarget: () => NugetPublishTarget,
|
|
81974
82012
|
PostmanPublishTarget: () => PostmanPublishTarget,
|
|
81975
82013
|
PublishTarget: () => PublishTarget2,
|
|
81976
82014
|
PublishingConfig: () => PublishingConfig2,
|
|
@@ -83236,6 +83274,7 @@ __export(serialization_exports2, {
|
|
|
83236
83274
|
NamedTypeDefault: () => NamedTypeDefault2,
|
|
83237
83275
|
NonStreamHttpResponseBody: () => NonStreamHttpResponseBody2,
|
|
83238
83276
|
NpmPublishTarget: () => NpmPublishTarget,
|
|
83277
|
+
NugetPublishTarget: () => NugetPublishTarget,
|
|
83239
83278
|
OAuthAccessTokenRequestProperties: () => OAuthAccessTokenRequestProperties,
|
|
83240
83279
|
OAuthAccessTokenResponseProperties: () => OAuthAccessTokenResponseProperties,
|
|
83241
83280
|
OAuthClientCredentials: () => OAuthClientCredentials,
|
|
@@ -102712,6 +102751,114 @@ var init_FernWorkspace = __esm({
|
|
|
102712
102751
|
}
|
|
102713
102752
|
});
|
|
102714
102753
|
|
|
102754
|
+
// ../../commons/api-workspace-commons/lib/getFilesystemPublishTarget.js
|
|
102755
|
+
function getFilesystemPublishTarget({ generatorInvocation, version: version7, userProvidedVersion, packageName, context: context3 }) {
|
|
102756
|
+
if (generatorInvocation.language === "python") {
|
|
102757
|
+
const publishTarget = PublishTarget.pypi({
|
|
102758
|
+
version: version7,
|
|
102759
|
+
packageName
|
|
102760
|
+
});
|
|
102761
|
+
context3.logger.debug(`Created PyPiPublishTarget: version ${version7} package name: ${packageName}`);
|
|
102762
|
+
return publishTarget;
|
|
102763
|
+
} else if (generatorInvocation.language === "typescript") {
|
|
102764
|
+
if (userProvidedVersion != null) {
|
|
102765
|
+
const tsPackageName = packageName ?? (typeof generatorInvocation.raw?.config === "object" && generatorInvocation.raw?.config !== null ? generatorInvocation.raw.config.packageJson?.name : void 0);
|
|
102766
|
+
const publishTarget = PublishTarget.npm({
|
|
102767
|
+
version: userProvidedVersion,
|
|
102768
|
+
packageName: tsPackageName,
|
|
102769
|
+
tokenEnvironmentVariable: ""
|
|
102770
|
+
});
|
|
102771
|
+
context3.logger.debug(`Created NpmPublishTarget: version ${userProvidedVersion} package name: ${tsPackageName}`);
|
|
102772
|
+
return publishTarget;
|
|
102773
|
+
}
|
|
102774
|
+
return void 0;
|
|
102775
|
+
} else if (generatorInvocation.language === "rust") {
|
|
102776
|
+
const publishTarget = PublishTarget.crates({
|
|
102777
|
+
version: version7,
|
|
102778
|
+
packageName
|
|
102779
|
+
});
|
|
102780
|
+
context3.logger.debug(`Created CratesPublishTarget: version ${version7} package name: ${packageName}`);
|
|
102781
|
+
return publishTarget;
|
|
102782
|
+
} else if (generatorInvocation.language === "go") {
|
|
102783
|
+
if (userProvidedVersion != null) {
|
|
102784
|
+
const goModulePath = (() => {
|
|
102785
|
+
const config5 = generatorInvocation.raw?.config;
|
|
102786
|
+
if (typeof config5 !== "object" || config5 === null) {
|
|
102787
|
+
return void 0;
|
|
102788
|
+
}
|
|
102789
|
+
const module4 = config5.module;
|
|
102790
|
+
if (module4 == null || typeof module4.path !== "string") {
|
|
102791
|
+
return void 0;
|
|
102792
|
+
}
|
|
102793
|
+
return module4.path;
|
|
102794
|
+
})();
|
|
102795
|
+
const publishTarget = PublishTarget.go({
|
|
102796
|
+
version: userProvidedVersion,
|
|
102797
|
+
modulePath: goModulePath
|
|
102798
|
+
});
|
|
102799
|
+
context3.logger.debug(`Created GoPublishTarget: version ${userProvidedVersion} module path: ${goModulePath}`);
|
|
102800
|
+
return publishTarget;
|
|
102801
|
+
}
|
|
102802
|
+
return void 0;
|
|
102803
|
+
} else if (generatorInvocation.language === "java") {
|
|
102804
|
+
const config5 = generatorInvocation.raw?.config;
|
|
102805
|
+
const mavenCoordinate = (() => {
|
|
102806
|
+
if (!config5 || typeof config5 !== "object" || config5 === null) {
|
|
102807
|
+
return void 0;
|
|
102808
|
+
}
|
|
102809
|
+
const configObj = config5;
|
|
102810
|
+
if (typeof configObj.group === "string" && typeof configObj.artifact === "string") {
|
|
102811
|
+
return {
|
|
102812
|
+
groupId: configObj.group,
|
|
102813
|
+
artifactId: configObj.artifact
|
|
102814
|
+
};
|
|
102815
|
+
} else if (typeof configObj["package-prefix"] === "string" && packageName) {
|
|
102816
|
+
return {
|
|
102817
|
+
groupId: configObj["package-prefix"],
|
|
102818
|
+
artifactId: packageName
|
|
102819
|
+
};
|
|
102820
|
+
} else if (typeof configObj["package-prefix"] === "string" && !packageName) {
|
|
102821
|
+
context3.logger.warn("Java generator has package-prefix configured but packageName is missing");
|
|
102822
|
+
}
|
|
102823
|
+
return void 0;
|
|
102824
|
+
})();
|
|
102825
|
+
const coordinate = mavenCoordinate ? `${mavenCoordinate.groupId}:${mavenCoordinate.artifactId}` : void 0;
|
|
102826
|
+
if (coordinate) {
|
|
102827
|
+
const mavenVersion = version7 ?? "0.0.0";
|
|
102828
|
+
const publishTarget = PublishTarget.maven({
|
|
102829
|
+
coordinate,
|
|
102830
|
+
version: mavenVersion,
|
|
102831
|
+
usernameEnvironmentVariable: "MAVEN_USERNAME",
|
|
102832
|
+
passwordEnvironmentVariable: "MAVEN_PASSWORD",
|
|
102833
|
+
mavenUrlEnvironmentVariable: "MAVEN_PUBLISH_REGISTRY_URL"
|
|
102834
|
+
});
|
|
102835
|
+
context3.logger.debug(`Created MavenPublishTarget: coordinate ${coordinate} version ${mavenVersion}`);
|
|
102836
|
+
return publishTarget;
|
|
102837
|
+
} else if (config5 && typeof config5 === "object") {
|
|
102838
|
+
context3.logger.debug("Java generator config provided but could not construct Maven coordinate. Expected either 'group' and 'artifact' or 'package-prefix' with packageName.");
|
|
102839
|
+
}
|
|
102840
|
+
return void 0;
|
|
102841
|
+
} else if (generatorInvocation.language === "csharp") {
|
|
102842
|
+
if (userProvidedVersion != null) {
|
|
102843
|
+
const csharpPackageName = packageName ?? (typeof generatorInvocation.raw?.config === "object" && generatorInvocation.raw?.config !== null ? generatorInvocation.raw.config["package-id"] : void 0);
|
|
102844
|
+
const publishTarget = PublishTarget.nuget({
|
|
102845
|
+
version: userProvidedVersion,
|
|
102846
|
+
packageName: typeof csharpPackageName === "string" ? csharpPackageName : void 0
|
|
102847
|
+
});
|
|
102848
|
+
context3.logger.debug(`Created NugetPublishTarget: version ${userProvidedVersion} package name: ${String(csharpPackageName)}`);
|
|
102849
|
+
return publishTarget;
|
|
102850
|
+
}
|
|
102851
|
+
return void 0;
|
|
102852
|
+
}
|
|
102853
|
+
return void 0;
|
|
102854
|
+
}
|
|
102855
|
+
var init_getFilesystemPublishTarget = __esm({
|
|
102856
|
+
"../../commons/api-workspace-commons/lib/getFilesystemPublishTarget.js"() {
|
|
102857
|
+
"use strict";
|
|
102858
|
+
init_lib9();
|
|
102859
|
+
}
|
|
102860
|
+
});
|
|
102861
|
+
|
|
102715
102862
|
// ../../commons/api-workspace-commons/lib/getOriginGitCommit.js
|
|
102716
102863
|
function getOriginGitCommit() {
|
|
102717
102864
|
if (process.env.IGNORE_GIT_IN_METADATA === "true") {
|
|
@@ -199292,6 +199439,7 @@ var init_lib17 = __esm({
|
|
|
199292
199439
|
init_detectInvocationSource();
|
|
199293
199440
|
init_FernFile();
|
|
199294
199441
|
init_FernWorkspace();
|
|
199442
|
+
init_getFilesystemPublishTarget();
|
|
199295
199443
|
init_getOriginGitCommit();
|
|
199296
199444
|
init_openapi();
|
|
199297
199445
|
init_Source5();
|
|
@@ -451866,7 +452014,7 @@ function parseMarkdownImage(content5, start2, metadata) {
|
|
|
451866
452014
|
}
|
|
451867
452015
|
const urlEnd = i5 - 1;
|
|
451868
452016
|
const url3 = content5.slice(urlStart, urlEnd).trim();
|
|
451869
|
-
const rawSrc = trimAnchor(url3);
|
|
452017
|
+
const rawSrc = trimAnchor(splitDestinationAndTitle(url3));
|
|
451870
452018
|
const src = rawSrc != null ? unescapeMarkdownUrl(rawSrc) : void 0;
|
|
451871
452019
|
const resolvedPath = resolvePath5(src, metadata);
|
|
451872
452020
|
if (rawSrc && src && resolvedPath) {
|
|
@@ -451882,6 +452030,27 @@ function parseMarkdownImage(content5, start2, metadata) {
|
|
|
451882
452030
|
}
|
|
451883
452031
|
return null;
|
|
451884
452032
|
}
|
|
452033
|
+
function splitDestinationAndTitle(url3) {
|
|
452034
|
+
if (url3.startsWith("<")) {
|
|
452035
|
+
let i6 = 1;
|
|
452036
|
+
while (i6 < url3.length && url3[i6] !== ">") {
|
|
452037
|
+
i6 += url3[i6] === "\\" ? 2 : 1;
|
|
452038
|
+
}
|
|
452039
|
+
if (i6 < url3.length) {
|
|
452040
|
+
return url3.slice(0, i6 + 1);
|
|
452041
|
+
}
|
|
452042
|
+
}
|
|
452043
|
+
let i5 = 0;
|
|
452044
|
+
while (i5 < url3.length && !/\s/.test(url3[i5])) {
|
|
452045
|
+
i5 += url3[i5] === "\\" ? 2 : 1;
|
|
452046
|
+
}
|
|
452047
|
+
const title2 = url3.slice(i5).trim();
|
|
452048
|
+
if (title2.length === 0) {
|
|
452049
|
+
return url3.slice(0, i5);
|
|
452050
|
+
}
|
|
452051
|
+
const isTitle = title2.length >= 2 && (title2.startsWith('"') && title2.endsWith('"') || title2.startsWith("'") && title2.endsWith("'") || title2.startsWith("(") && title2.endsWith(")"));
|
|
452052
|
+
return isTitle ? url3.slice(0, i5) : url3;
|
|
452053
|
+
}
|
|
451885
452054
|
function parseMarkdownLink(content5, start2, metadata) {
|
|
451886
452055
|
let i5 = start2 + 1;
|
|
451887
452056
|
const len = content5.length;
|
|
@@ -452307,8 +452476,10 @@ function replaceImagePathsAndUrls(markdown, fileIdsMap, markdownFilesToPathName,
|
|
|
452307
452476
|
}
|
|
452308
452477
|
const urlEnd = j5 - 1;
|
|
452309
452478
|
const href = content5.slice(urlStart, urlEnd).trim();
|
|
452310
|
-
const
|
|
452311
|
-
const
|
|
452479
|
+
const destination = splitDestinationAndTitle(href);
|
|
452480
|
+
const hrefTitle = href.slice(destination.length);
|
|
452481
|
+
const trimmedHref = trimAnchor(destination) ?? destination;
|
|
452482
|
+
const hrefAnchor = trimmedHref !== destination ? destination.slice(trimmedHref.length) : "";
|
|
452312
452483
|
const replacedHref = getReplacedHref({
|
|
452313
452484
|
href: trimmedHref,
|
|
452314
452485
|
markdownFilesToPathName,
|
|
@@ -452318,7 +452489,7 @@ function replaceImagePathsAndUrls(markdown, fileIdsMap, markdownFilesToPathName,
|
|
|
452318
452489
|
edits.push({
|
|
452319
452490
|
start: urlStart,
|
|
452320
452491
|
end: urlEnd,
|
|
452321
|
-
replacement: replacedHref.slug + hrefAnchor
|
|
452492
|
+
replacement: replacedHref.slug + hrefAnchor + hrefTitle
|
|
452322
452493
|
});
|
|
452323
452494
|
}
|
|
452324
452495
|
i5 = j5;
|
|
@@ -566744,8 +566915,8 @@ var require_VersionUtils = __commonJS({
|
|
|
566744
566915
|
};
|
|
566745
566916
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
566746
566917
|
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;
|
|
566747
|
-
exports2.extractLanguageFromGeneratorName =
|
|
566748
|
-
exports2.mapMagicVersionForLanguage =
|
|
566918
|
+
exports2.extractLanguageFromGeneratorName = extractLanguageFromGeneratorName4;
|
|
566919
|
+
exports2.mapMagicVersionForLanguage = mapMagicVersionForLanguage5;
|
|
566749
566920
|
exports2.maxVersionBump = maxVersionBump3;
|
|
566750
566921
|
exports2.isAutoVersion = isAutoVersion5;
|
|
566751
566922
|
exports2.isValidSemver = isValidSemver;
|
|
@@ -566753,7 +566924,7 @@ var require_VersionUtils = __commonJS({
|
|
|
566753
566924
|
exports2.extractPreviousVersionFromDiffLine = extractPreviousVersionFromDiffLine;
|
|
566754
566925
|
var semver_1 = __importDefault2(require_semver2());
|
|
566755
566926
|
var AutoVersioningService_js_1 = require_AutoVersioningService();
|
|
566756
|
-
function
|
|
566927
|
+
function extractLanguageFromGeneratorName4(generatorName) {
|
|
566757
566928
|
const name2 = generatorName.toLowerCase();
|
|
566758
566929
|
if (name2.includes("typescript") || name2.includes("ts-sdk") || name2.includes("node-sdk")) {
|
|
566759
566930
|
return "typescript";
|
|
@@ -566790,7 +566961,7 @@ var require_VersionUtils = __commonJS({
|
|
|
566790
566961
|
exports2.AUTO_VERSION = "AUTO";
|
|
566791
566962
|
exports2.MAGIC_VERSION = "0.0.0-fern-placeholder";
|
|
566792
566963
|
exports2.MAGIC_VERSION_PYTHON = "0.0.0.dev0";
|
|
566793
|
-
function
|
|
566964
|
+
function mapMagicVersionForLanguage5(magicVersion, language) {
|
|
566794
566965
|
if (magicVersion !== exports2.MAGIC_VERSION) {
|
|
566795
566966
|
return magicVersion;
|
|
566796
566967
|
}
|
|
@@ -691584,7 +691755,7 @@ var AccessTokenPosthogManager = class {
|
|
|
691584
691755
|
properties: {
|
|
691585
691756
|
...event,
|
|
691586
691757
|
...event.properties,
|
|
691587
|
-
version: "5.80.
|
|
691758
|
+
version: "5.80.5",
|
|
691588
691759
|
usingAccessToken: true,
|
|
691589
691760
|
...getRunIdProperties()
|
|
691590
691761
|
}
|
|
@@ -691650,7 +691821,7 @@ var UserPosthogManager = class {
|
|
|
691650
691821
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
691651
691822
|
event: "CLI",
|
|
691652
691823
|
properties: {
|
|
691653
|
-
version: "5.80.
|
|
691824
|
+
version: "5.80.5",
|
|
691654
691825
|
...event,
|
|
691655
691826
|
...event.properties,
|
|
691656
691827
|
usingAccessToken: false,
|
|
@@ -872756,7 +872927,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
872756
872927
|
var LOGS_FOLDER_NAME = "logs";
|
|
872757
872928
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
872758
872929
|
function getCliSource() {
|
|
872759
|
-
const version7 = "5.80.
|
|
872930
|
+
const version7 = "5.80.5";
|
|
872760
872931
|
return `cli@${version7}`;
|
|
872761
872932
|
}
|
|
872762
872933
|
var DebugLogger = class {
|
|
@@ -902641,7 +902812,7 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
902641
902812
|
const fdr = createFdrService({ token: token.value });
|
|
902642
902813
|
const fdrOrigin = "https://registry-dev2.buildwithfern.com";
|
|
902643
902814
|
const isAirGapped = await detectAirGappedMode(`${fdrOrigin}/health`, interactiveTaskContext.logger);
|
|
902644
|
-
const packageName = generators_yml_exports.getPackageName({ generatorInvocation });
|
|
902815
|
+
const packageName = generators_yml_exports.getPackageName({ generatorInvocation }) ?? (generatorInvocation.outputMode.type === "downloadFiles" ? getPackageNameFromGeneratorConfig(generatorInvocation) : void 0);
|
|
902645
902816
|
const isPreview = isPreviewOverride ?? absolutePathToPreview != null;
|
|
902646
902817
|
const substituteEnvVars = (stringOrObject) => replaceEnvVariables(stringOrObject, {
|
|
902647
902818
|
onError: (e2) => {
|
|
@@ -902820,7 +902991,14 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
902820
902991
|
intermediateRepresentation: {
|
|
902821
902992
|
...ir3,
|
|
902822
902993
|
fdrApiDefinitionId,
|
|
902823
|
-
publishConfig: getPublishConfig({
|
|
902994
|
+
publishConfig: getPublishConfig({
|
|
902995
|
+
generatorInvocation: generatorInvocationWithEnvVarSubstitutions,
|
|
902996
|
+
version: resolvedVersion,
|
|
902997
|
+
userProvidedVersion: version7,
|
|
902998
|
+
packageName,
|
|
902999
|
+
selfHosted: ir3.selfHosted ?? false,
|
|
903000
|
+
context: interactiveTaskContext
|
|
903001
|
+
})
|
|
902824
903002
|
},
|
|
902825
903003
|
shouldLogS3Url,
|
|
902826
903004
|
token,
|
|
@@ -902901,9 +903079,20 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
902901
903079
|
}
|
|
902902
903080
|
return result;
|
|
902903
903081
|
}
|
|
902904
|
-
function getPublishConfig({ generatorInvocation }) {
|
|
903082
|
+
function getPublishConfig({ generatorInvocation, version: version7, userProvidedVersion, packageName, selfHosted, context: context3 }) {
|
|
903083
|
+
const publishLanguage = generatorInvocation.language ?? (0, import_autoversion.extractLanguageFromGeneratorName)(generatorInvocation.name);
|
|
903084
|
+
const substituteAutoVersion = (candidate) => candidate != null && (0, import_autoversion.isAutoVersion)(candidate) ? (0, import_autoversion.mapMagicVersionForLanguage)(import_autoversion.MAGIC_VERSION, publishLanguage) : candidate;
|
|
902905
903085
|
return generatorInvocation.outputMode._visit({
|
|
902906
|
-
downloadFiles: () =>
|
|
903086
|
+
downloadFiles: () => api_exports.PublishingConfig.filesystem({
|
|
903087
|
+
generateFullProject: selfHosted,
|
|
903088
|
+
publishTarget: getFilesystemPublishTarget({
|
|
903089
|
+
generatorInvocation,
|
|
903090
|
+
version: substituteAutoVersion(version7),
|
|
903091
|
+
userProvidedVersion: substituteAutoVersion(userProvidedVersion),
|
|
903092
|
+
packageName,
|
|
903093
|
+
context: context3
|
|
903094
|
+
})
|
|
903095
|
+
}),
|
|
902907
903096
|
github: () => void 0,
|
|
902908
903097
|
githubV2: () => void 0,
|
|
902909
903098
|
publish: () => void 0,
|
|
@@ -905434,7 +905623,7 @@ var LegacyDocsPublisher = class {
|
|
|
905434
905623
|
previewId,
|
|
905435
905624
|
disableTemplates: void 0,
|
|
905436
905625
|
skipUpload,
|
|
905437
|
-
cliVersion: "5.80.
|
|
905626
|
+
cliVersion: "5.80.5",
|
|
905438
905627
|
loginCommand: "fern auth login"
|
|
905439
905628
|
});
|
|
905440
905629
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -921692,6 +921881,25 @@ var TestClass = class extends Node5 {
|
|
|
921692
921881
|
}
|
|
921693
921882
|
};
|
|
921694
921883
|
|
|
921884
|
+
// ../../../generators/csharp/codegen/lib/context/filesystem-nuget-publish-target.js
|
|
921885
|
+
function isRecord2(value2) {
|
|
921886
|
+
return typeof value2 === "object" && value2 != null;
|
|
921887
|
+
}
|
|
921888
|
+
function getFilesystemNugetPublishTarget(ir3) {
|
|
921889
|
+
const publishConfig = ir3.publishConfig;
|
|
921890
|
+
if (!isRecord2(publishConfig) || publishConfig.type !== "filesystem") {
|
|
921891
|
+
return void 0;
|
|
921892
|
+
}
|
|
921893
|
+
const publishTarget = publishConfig.publishTarget;
|
|
921894
|
+
if (!isRecord2(publishTarget) || publishTarget.type !== "nuget") {
|
|
921895
|
+
return void 0;
|
|
921896
|
+
}
|
|
921897
|
+
return {
|
|
921898
|
+
version: typeof publishTarget.version === "string" ? publishTarget.version : void 0,
|
|
921899
|
+
packageName: typeof publishTarget.packageName === "string" ? publishTarget.packageName : void 0
|
|
921900
|
+
};
|
|
921901
|
+
}
|
|
921902
|
+
|
|
921695
921903
|
// ../../../generators/csharp/codegen/lib/context/knownTypes.js
|
|
921696
921904
|
var builtIns = {
|
|
921697
921905
|
// Core System namespace - fundamental types, exceptions, and basic functionality
|
|
@@ -925319,8 +925527,8 @@ var Generation = class {
|
|
|
925319
925527
|
client: () => upperFirst2(camelCase4(`${this.generatorConfig.organization}_${this.generatorConfig.workspaceName}`)),
|
|
925320
925528
|
/** The prefix used for client-related classes, customizable via config or defaults to clientName. */
|
|
925321
925529
|
clientPrefix: () => this.settings.exportedClientClassName || this.settings.clientClassName || this.names.project.client,
|
|
925322
|
-
/** The NuGet package identifier for the generated SDK
|
|
925323
|
-
packageId: () => this.settings.packageId || this.namespaces.root
|
|
925530
|
+
/** The NuGet package identifier for the generated SDK. Falls back to the nuget filesystem publish target (local-file-system output), then the root namespace. */
|
|
925531
|
+
packageId: () => this.settings.packageId || getFilesystemNugetPublishTarget(this.ir)?.packageName || this.namespaces.root
|
|
925324
925532
|
}),
|
|
925325
925533
|
files: lazy23({
|
|
925326
925534
|
/* the name of the project */
|
|
@@ -960519,85 +960727,13 @@ function getPublishConfig2({ generatorInvocation, org, version: version7, userPr
|
|
|
960519
960727
|
});
|
|
960520
960728
|
}
|
|
960521
960729
|
if (generatorInvocation.raw?.output?.location === "local-file-system") {
|
|
960522
|
-
|
|
960523
|
-
|
|
960524
|
-
|
|
960525
|
-
|
|
960526
|
-
|
|
960527
|
-
|
|
960528
|
-
|
|
960529
|
-
} else if (generatorInvocation.language === "typescript") {
|
|
960530
|
-
if (effectiveUserProvidedVersion != null) {
|
|
960531
|
-
const tsPackageName = packageName ?? (typeof generatorInvocation.raw?.config === "object" && generatorInvocation.raw?.config !== null ? generatorInvocation.raw.config.packageJson?.name : void 0);
|
|
960532
|
-
publishTarget = PublishTarget.npm({
|
|
960533
|
-
version: effectiveUserProvidedVersion,
|
|
960534
|
-
packageName: tsPackageName,
|
|
960535
|
-
tokenEnvironmentVariable: ""
|
|
960536
|
-
});
|
|
960537
|
-
context3.logger.debug(`Created NpmPublishTarget: version ${effectiveUserProvidedVersion} package name: ${tsPackageName}`);
|
|
960538
|
-
}
|
|
960539
|
-
} else if (generatorInvocation.language === "rust") {
|
|
960540
|
-
publishTarget = PublishTarget.crates({
|
|
960541
|
-
version: effectiveVersion,
|
|
960542
|
-
packageName
|
|
960543
|
-
});
|
|
960544
|
-
context3.logger.debug(`Created CratesPublishTarget: version ${effectiveVersion} package name: ${packageName}`);
|
|
960545
|
-
} else if (generatorInvocation.language === "go") {
|
|
960546
|
-
if (effectiveUserProvidedVersion != null) {
|
|
960547
|
-
const goModulePath = (() => {
|
|
960548
|
-
const config5 = generatorInvocation.raw?.config;
|
|
960549
|
-
if (typeof config5 !== "object" || config5 === null) {
|
|
960550
|
-
return void 0;
|
|
960551
|
-
}
|
|
960552
|
-
const module4 = config5.module;
|
|
960553
|
-
if (module4 == null || typeof module4.path !== "string") {
|
|
960554
|
-
return void 0;
|
|
960555
|
-
}
|
|
960556
|
-
return module4.path;
|
|
960557
|
-
})();
|
|
960558
|
-
publishTarget = PublishTarget.go({
|
|
960559
|
-
version: effectiveUserProvidedVersion,
|
|
960560
|
-
modulePath: goModulePath
|
|
960561
|
-
});
|
|
960562
|
-
context3.logger.debug(`Created GoPublishTarget: version ${effectiveUserProvidedVersion} module path: ${goModulePath}`);
|
|
960563
|
-
}
|
|
960564
|
-
} else if (generatorInvocation.language === "java") {
|
|
960565
|
-
const config5 = generatorInvocation.raw?.config;
|
|
960566
|
-
const mavenCoordinate = (() => {
|
|
960567
|
-
if (!config5 || typeof config5 !== "object" || config5 === null) {
|
|
960568
|
-
return void 0;
|
|
960569
|
-
}
|
|
960570
|
-
const configObj = config5;
|
|
960571
|
-
if (typeof configObj.group === "string" && typeof configObj.artifact === "string") {
|
|
960572
|
-
return {
|
|
960573
|
-
groupId: configObj.group,
|
|
960574
|
-
artifactId: configObj.artifact
|
|
960575
|
-
};
|
|
960576
|
-
} else if (typeof configObj["package-prefix"] === "string" && packageName) {
|
|
960577
|
-
return {
|
|
960578
|
-
groupId: configObj["package-prefix"],
|
|
960579
|
-
artifactId: packageName
|
|
960580
|
-
};
|
|
960581
|
-
} else if (typeof configObj["package-prefix"] === "string" && !packageName) {
|
|
960582
|
-
context3.logger.warn("Java generator has package-prefix configured but packageName is missing");
|
|
960583
|
-
}
|
|
960584
|
-
return void 0;
|
|
960585
|
-
})();
|
|
960586
|
-
const coordinate = mavenCoordinate ? `${mavenCoordinate.groupId}:${mavenCoordinate.artifactId}` : void 0;
|
|
960587
|
-
if (coordinate) {
|
|
960588
|
-
const mavenVersion = effectiveVersion ?? "0.0.0";
|
|
960589
|
-
publishTarget = PublishTarget.maven({
|
|
960590
|
-
coordinate,
|
|
960591
|
-
version: mavenVersion,
|
|
960592
|
-
usernameEnvironmentVariable: "MAVEN_USERNAME",
|
|
960593
|
-
passwordEnvironmentVariable: "MAVEN_PASSWORD",
|
|
960594
|
-
mavenUrlEnvironmentVariable: "MAVEN_PUBLISH_REGISTRY_URL"
|
|
960595
|
-
});
|
|
960596
|
-
context3.logger.debug(`Created MavenPublishTarget: coordinate ${coordinate} version ${mavenVersion}`);
|
|
960597
|
-
} else if (config5 && typeof config5 === "object") {
|
|
960598
|
-
context3.logger.debug("Java generator config provided but could not construct Maven coordinate. Expected either 'group' and 'artifact' or 'package-prefix' with packageName.");
|
|
960599
|
-
}
|
|
960600
|
-
}
|
|
960730
|
+
const publishTarget = getFilesystemPublishTarget({
|
|
960731
|
+
generatorInvocation,
|
|
960732
|
+
version: effectiveVersion,
|
|
960733
|
+
userProvidedVersion: effectiveUserProvidedVersion,
|
|
960734
|
+
packageName,
|
|
960735
|
+
context: context3
|
|
960736
|
+
});
|
|
960601
960737
|
return api_exports.PublishingConfig.filesystem({
|
|
960602
960738
|
generateFullProject: generateTests || org?.selfHostedSdKs || false,
|
|
960603
960739
|
publishTarget
|
|
@@ -964605,11 +964741,11 @@ function getFirstUrlSegment({ path: path120 }) {
|
|
|
964605
964741
|
}
|
|
964606
964742
|
|
|
964607
964743
|
// ../docs-importers/mintlify/lib/MintlifyImporter.js
|
|
964608
|
-
function
|
|
964744
|
+
function isRecord3(value2) {
|
|
964609
964745
|
return typeof value2 === "object" && value2 != null && !Array.isArray(value2);
|
|
964610
964746
|
}
|
|
964611
964747
|
function hasNavigationArray(value2) {
|
|
964612
|
-
return
|
|
964748
|
+
return isRecord3(value2) && Array.isArray(value2.navigation);
|
|
964613
964749
|
}
|
|
964614
964750
|
var MintlifyImporter = class extends DocsImporter {
|
|
964615
964751
|
documentationTab = void 0;
|
|
@@ -972352,7 +972488,7 @@ function getAutomationContextFromEnv() {
|
|
|
972352
972488
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
972353
972489
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
972354
972490
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
972355
|
-
cli_version: "5.80.
|
|
972491
|
+
cli_version: "5.80.5"
|
|
972356
972492
|
};
|
|
972357
972493
|
}
|
|
972358
972494
|
function isAutomationMode() {
|
|
@@ -973184,7 +973320,7 @@ var CliContext = class _CliContext {
|
|
|
973184
973320
|
if (false) {
|
|
973185
973321
|
this.logger.error("CLI_VERSION is not defined");
|
|
973186
973322
|
}
|
|
973187
|
-
return "5.80.
|
|
973323
|
+
return "5.80.5";
|
|
973188
973324
|
}
|
|
973189
973325
|
getCliName() {
|
|
973190
973326
|
if (false) {
|
package/package.json
CHANGED