@fern-api/fern-api-dev 5.23.3-1908-g908f2e99679 → 5.23.3-1914-gc2c69d7cf16
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 +138 -11
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -622452,7 +622452,7 @@ var require_ReadmeGenerator = __commonJS({
|
|
|
622452
622452
|
docsLink: this.readmeConfig.apiReferenceLink
|
|
622453
622453
|
}));
|
|
622454
622454
|
}
|
|
622455
|
-
if (this.readmeConfig.requirements != null) {
|
|
622455
|
+
if (this.readmeConfig.requirements != null && this.readmeConfig.requirements.length > 0) {
|
|
622456
622456
|
blocks2.push(await this.generateRequirements({
|
|
622457
622457
|
requirements: this.readmeConfig.requirements
|
|
622458
622458
|
}));
|
|
@@ -702935,7 +702935,7 @@ var AccessTokenPosthogManager = class {
|
|
|
702935
702935
|
properties: {
|
|
702936
702936
|
...event,
|
|
702937
702937
|
...event.properties,
|
|
702938
|
-
version: "5.23.3-
|
|
702938
|
+
version: "5.23.3-1914-gc2c69d7cf16",
|
|
702939
702939
|
usingAccessToken: true,
|
|
702940
702940
|
...getRunIdProperties()
|
|
702941
702941
|
}
|
|
@@ -703001,7 +703001,7 @@ var UserPosthogManager = class {
|
|
|
703001
703001
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
703002
703002
|
event: "CLI",
|
|
703003
703003
|
properties: {
|
|
703004
|
-
version: "5.23.3-
|
|
703004
|
+
version: "5.23.3-1914-gc2c69d7cf16",
|
|
703005
703005
|
...event,
|
|
703006
703006
|
...event.properties,
|
|
703007
703007
|
usingAccessToken: false,
|
|
@@ -884383,7 +884383,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
884383
884383
|
var LOGS_FOLDER_NAME = "logs";
|
|
884384
884384
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
884385
884385
|
function getCliSource() {
|
|
884386
|
-
const version7 = "5.23.3-
|
|
884386
|
+
const version7 = "5.23.3-1914-gc2c69d7cf16";
|
|
884387
884387
|
return `cli@${version7}`;
|
|
884388
884388
|
}
|
|
884389
884389
|
var DebugLogger = class {
|
|
@@ -909703,7 +909703,7 @@ var LegacyDocsPublisher = class {
|
|
|
909703
909703
|
previewId,
|
|
909704
909704
|
disableTemplates: void 0,
|
|
909705
909705
|
skipUpload,
|
|
909706
|
-
cliVersion: "5.23.3-
|
|
909706
|
+
cliVersion: "5.23.3-1914-gc2c69d7cf16",
|
|
909707
909707
|
loginCommand: "fern auth login"
|
|
909708
909708
|
});
|
|
909709
909709
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -914820,7 +914820,7 @@ function buildSnippetTestGeneratorConfig(config5) {
|
|
|
914820
914820
|
}
|
|
914821
914821
|
|
|
914822
914822
|
// ../../../generators/csharp/codegen/lib/ast/core/Writer.js
|
|
914823
|
-
var Writer = class extends AbstractWriter {
|
|
914823
|
+
var Writer = class _Writer extends AbstractWriter {
|
|
914824
914824
|
/* Import statements */
|
|
914825
914825
|
references = {};
|
|
914826
914826
|
/* The namespace that is being written to */
|
|
@@ -914869,6 +914869,30 @@ var Writer = class extends AbstractWriter {
|
|
|
914869
914869
|
popTypeScope() {
|
|
914870
914870
|
this.typeScopeStack.pop();
|
|
914871
914871
|
}
|
|
914872
|
+
/* Renders the node in isolation and returns the result instead of appending it to this
|
|
914873
|
+
writer's buffer. References collected while rendering are forwarded to this writer so
|
|
914874
|
+
that the imports the node depends on are still emitted. */
|
|
914875
|
+
renderNodeToString(node4) {
|
|
914876
|
+
const scratch = new _Writer({
|
|
914877
|
+
namespace: this.namespace,
|
|
914878
|
+
allNamespaceSegments: this.allNamespaceSegments,
|
|
914879
|
+
allTypeClassReferences: this.allTypeClassReferences,
|
|
914880
|
+
generation: this.generation,
|
|
914881
|
+
skipImports: this.skipImports,
|
|
914882
|
+
skipGlobalQualifier: this.skipGlobalQualifier
|
|
914883
|
+
});
|
|
914884
|
+
for (const enclosingType of this.typeScopeStack) {
|
|
914885
|
+
scratch.pushTypeScope(enclosingType);
|
|
914886
|
+
}
|
|
914887
|
+
scratch.writeNode(node4);
|
|
914888
|
+
for (const [namespace, references] of Object.entries(scratch.references)) {
|
|
914889
|
+
this.addNamespace(namespace);
|
|
914890
|
+
for (const reference4 of references) {
|
|
914891
|
+
this.addReference(reference4);
|
|
914892
|
+
}
|
|
914893
|
+
}
|
|
914894
|
+
return scratch.toString(true);
|
|
914895
|
+
}
|
|
914872
914896
|
addNamespace(namespace) {
|
|
914873
914897
|
const foundNamespace = this.references[namespace];
|
|
914874
914898
|
if (foundNamespace == null) {
|
|
@@ -924309,6 +924333,30 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924309
924333
|
"thead",
|
|
924310
924334
|
"tbody"
|
|
924311
924335
|
]);
|
|
924336
|
+
// Matches an ampersand that does not already begin a character or entity reference
|
|
924337
|
+
static BARE_AMPERSAND_PATTERN = /&(?!(?:[a-zA-Z][a-zA-Z0-9]*|#[0-9]+|#x[0-9a-fA-F]+);)/g;
|
|
924338
|
+
// A (possibly namespace-qualified) type name, optionally followed by generic arguments
|
|
924339
|
+
static TYPE_NAME_PATTERN = /^([A-Za-z_][A-Za-z0-9_.]*)(?:<(.+)>)?$/;
|
|
924340
|
+
static IDENTIFIER_PATTERN = /^[A-Za-z_][A-Za-z0-9_.]*$/;
|
|
924341
|
+
// Generic arguments in a cref must be identifiers, so keyword aliases are replaced by the
|
|
924342
|
+
// framework type they alias
|
|
924343
|
+
static KEYWORD_ALIASES = {
|
|
924344
|
+
bool: "Boolean",
|
|
924345
|
+
byte: "Byte",
|
|
924346
|
+
char: "Char",
|
|
924347
|
+
decimal: "Decimal",
|
|
924348
|
+
double: "Double",
|
|
924349
|
+
float: "Single",
|
|
924350
|
+
int: "Int32",
|
|
924351
|
+
long: "Int64",
|
|
924352
|
+
object: "Object",
|
|
924353
|
+
sbyte: "SByte",
|
|
924354
|
+
short: "Int16",
|
|
924355
|
+
string: "String",
|
|
924356
|
+
uint: "UInt32",
|
|
924357
|
+
ulong: "UInt64",
|
|
924358
|
+
ushort: "UInt16"
|
|
924359
|
+
};
|
|
924312
924360
|
writer;
|
|
924313
924361
|
wrotePrefixOnCurrentLine = false;
|
|
924314
924362
|
constructor(writer2) {
|
|
@@ -924362,6 +924410,73 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924362
924410
|
writeNode(node4) {
|
|
924363
924411
|
this.writer.writeNode(node4);
|
|
924364
924412
|
}
|
|
924413
|
+
/**
|
|
924414
|
+
* Writes a documentation reference to a type. Types that can be expressed as a
|
|
924415
|
+
* documentation comment identifier are written as `<see cref="..."/>` so that the
|
|
924416
|
+
* compiler resolves them and IDEs link them; anything else falls back to inline code.
|
|
924417
|
+
*/
|
|
924418
|
+
writeSeeType(type7) {
|
|
924419
|
+
const rendered = this.writer.renderNodeToString(type7);
|
|
924420
|
+
const crefTarget = _XmlDocWriter.toCrefTarget(rendered);
|
|
924421
|
+
if (crefTarget != null) {
|
|
924422
|
+
this.write(`<see cref="${crefTarget}"/>`);
|
|
924423
|
+
return;
|
|
924424
|
+
}
|
|
924425
|
+
this.write(`<c>${this.escapeXmlDocContent(rendered)}</c>`);
|
|
924426
|
+
}
|
|
924427
|
+
/**
|
|
924428
|
+
* Converts C# source syntax for a type into a documentation comment identifier, or returns
|
|
924429
|
+
* undefined when the type cannot be expressed as one.
|
|
924430
|
+
*
|
|
924431
|
+
* Nullable annotations are dropped (`object?` -> `object`) because they are not part of a
|
|
924432
|
+
* type's identifier, and generic arguments use brace syntax (`List<Foo>` -> `List{Foo}`)
|
|
924433
|
+
* because crefs are resolved by the compiler rather than rendered as text. Generic arguments
|
|
924434
|
+
* must be identifiers, so keyword aliases become framework type names
|
|
924435
|
+
* (`List<string>` -> `List{String}`) and arrays or nested generic arguments are rejected.
|
|
924436
|
+
*/
|
|
924437
|
+
static toCrefTarget(renderedType) {
|
|
924438
|
+
const type7 = renderedType.trim().replaceAll("?", "");
|
|
924439
|
+
const match3 = _XmlDocWriter.TYPE_NAME_PATTERN.exec(type7);
|
|
924440
|
+
if (match3 == null) {
|
|
924441
|
+
return void 0;
|
|
924442
|
+
}
|
|
924443
|
+
const [, name2, genericArguments] = match3;
|
|
924444
|
+
if (name2 == null) {
|
|
924445
|
+
return void 0;
|
|
924446
|
+
}
|
|
924447
|
+
if (genericArguments == null) {
|
|
924448
|
+
return name2;
|
|
924449
|
+
}
|
|
924450
|
+
const crefArguments = [];
|
|
924451
|
+
for (const argument of _XmlDocWriter.splitGenericArguments(genericArguments)) {
|
|
924452
|
+
const identifier2 = _XmlDocWriter.KEYWORD_ALIASES[argument] ?? argument;
|
|
924453
|
+
if (!_XmlDocWriter.IDENTIFIER_PATTERN.test(identifier2)) {
|
|
924454
|
+
return void 0;
|
|
924455
|
+
}
|
|
924456
|
+
crefArguments.push(identifier2);
|
|
924457
|
+
}
|
|
924458
|
+
return crefArguments.length === 0 ? void 0 : `${name2}{${crefArguments.join(", ")}}`;
|
|
924459
|
+
}
|
|
924460
|
+
static splitGenericArguments(genericArguments) {
|
|
924461
|
+
const arguments_ = [];
|
|
924462
|
+
let depth = 0;
|
|
924463
|
+
let current3 = "";
|
|
924464
|
+
for (const character of genericArguments) {
|
|
924465
|
+
if (character === "," && depth === 0) {
|
|
924466
|
+
arguments_.push(current3.trim());
|
|
924467
|
+
current3 = "";
|
|
924468
|
+
continue;
|
|
924469
|
+
}
|
|
924470
|
+
if (character === "<") {
|
|
924471
|
+
depth++;
|
|
924472
|
+
} else if (character === ">") {
|
|
924473
|
+
depth--;
|
|
924474
|
+
}
|
|
924475
|
+
current3 += character;
|
|
924476
|
+
}
|
|
924477
|
+
arguments_.push(current3.trim());
|
|
924478
|
+
return arguments_;
|
|
924479
|
+
}
|
|
924365
924480
|
writeXmlNode(nodeName, text9) {
|
|
924366
924481
|
this.writePrefix();
|
|
924367
924482
|
this.writeOpenXmlNode(nodeName);
|
|
@@ -924411,7 +924526,7 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924411
924526
|
}
|
|
924412
924527
|
return match3;
|
|
924413
924528
|
});
|
|
924414
|
-
const escaped = withPlaceholders.replaceAll("<", "<").replaceAll(">", ">");
|
|
924529
|
+
const escaped = withPlaceholders.replace(_XmlDocWriter.BARE_AMPERSAND_PATTERN, "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
924415
924530
|
return escaped.replace(/\uE000(\d+)\uE000/g, (_5, index3) => tags[parseInt(index3, 10)] ?? "");
|
|
924416
924531
|
}
|
|
924417
924532
|
convertHtmlToXmlDoc(text9) {
|
|
@@ -924475,7 +924590,7 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924475
924590
|
case "a": {
|
|
924476
924591
|
const href = el.attribs.href;
|
|
924477
924592
|
if (href) {
|
|
924478
|
-
return `<see href="${href}">${children2}</see>`;
|
|
924593
|
+
return `<see href="${_XmlDocWriter.escapeXmlAttributeValue(href)}">${children2}</see>`;
|
|
924479
924594
|
}
|
|
924480
924595
|
return children2;
|
|
924481
924596
|
}
|
|
@@ -924505,7 +924620,7 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924505
924620
|
return children2;
|
|
924506
924621
|
default: {
|
|
924507
924622
|
if (_XmlDocWriter.SAFE_XML_DOC_TAGS.has(tag2)) {
|
|
924508
|
-
const attrs = Object.entries(el.attribs).map(([k4, v3]) => ` ${k4}="${v3}"`).join("");
|
|
924623
|
+
const attrs = Object.entries(el.attribs).map(([k4, v3]) => ` ${k4}="${_XmlDocWriter.escapeXmlAttributeValue(v3)}"`).join("");
|
|
924509
924624
|
if (el.children.length === 0) {
|
|
924510
924625
|
return `<${el.name}${attrs}/>`;
|
|
924511
924626
|
}
|
|
@@ -924515,6 +924630,14 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924515
924630
|
}
|
|
924516
924631
|
}
|
|
924517
924632
|
}
|
|
924633
|
+
/**
|
|
924634
|
+
* Escapes the markup characters that are not allowed raw inside an XML attribute value.
|
|
924635
|
+
* Ampersands that already begin a character or entity reference are left alone so that
|
|
924636
|
+
* values such as `?a=1&b=2` are not double escaped.
|
|
924637
|
+
*/
|
|
924638
|
+
static escapeXmlAttributeValue(value2) {
|
|
924639
|
+
return value2.replace(_XmlDocWriter.BARE_AMPERSAND_PATTERN, "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """);
|
|
924640
|
+
}
|
|
924518
924641
|
decodeHtmlEntities(text9) {
|
|
924519
924642
|
const entityMap = {
|
|
924520
924643
|
"+": "+",
|
|
@@ -929508,6 +929631,10 @@ var Generation = class {
|
|
|
929508
929631
|
rootNamespaceForCoreClasses: () => this.customConfig["root-namespace-for-core-classes"] ?? true,
|
|
929509
929632
|
/** Custom NuGet package identifier. Default: "" (uses root namespace). */
|
|
929510
929633
|
packageId: () => this.customConfig["package-id"] ?? "",
|
|
929634
|
+
/** When true, the generated csproj emits XML documentation so the nupkg ships `<Namespace>.xml`. Default: true. */
|
|
929635
|
+
generateDocumentationFile: () => this.customConfig["generate-documentation-file"] ?? true,
|
|
929636
|
+
/** NuGet package metadata (description, authors, tags, icon, urls, SourceLink, symbols) for the generated csproj. Default: {}. */
|
|
929637
|
+
packageMetadata: () => this.customConfig["package-metadata"] ?? {},
|
|
929511
929638
|
/** When true, generates enums that can handle unknown/future values gracefully. Default: true. */
|
|
929512
929639
|
isForwardCompatibleEnumsEnabled: () => this.customConfig["enable-forward-compatible-enums"] ?? this.customConfig["experimental-enable-forward-compatible-enums"] ?? true,
|
|
929513
929640
|
/** Mapping of websocket environment configurations. Default: {}. */
|
|
@@ -976947,7 +977074,7 @@ function getAutomationContextFromEnv() {
|
|
|
976947
977074
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
976948
977075
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
976949
977076
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
976950
|
-
cli_version: "5.23.3-
|
|
977077
|
+
cli_version: "5.23.3-1914-gc2c69d7cf16"
|
|
976951
977078
|
};
|
|
976952
977079
|
}
|
|
976953
977080
|
function isAutomationMode() {
|
|
@@ -977779,7 +977906,7 @@ var CliContext = class _CliContext {
|
|
|
977779
977906
|
if (false) {
|
|
977780
977907
|
this.logger.error("CLI_VERSION is not defined");
|
|
977781
977908
|
}
|
|
977782
|
-
return "5.23.3-
|
|
977909
|
+
return "5.23.3-1914-gc2c69d7cf16";
|
|
977783
977910
|
}
|
|
977784
977911
|
getCliName() {
|
|
977785
977912
|
if (false) {
|
package/package.json
CHANGED