@fern-api/fern-api-dev 5.23.3-1907-g65eb98dc35d → 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 +140 -11
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -142701,6 +142701,8 @@ function isSchemaEqual(a3, b5) {
|
|
|
142701
142701
|
return a3.schema === b5.schema;
|
|
142702
142702
|
} else if (a3.type === "optional" && b5.type === "optional") {
|
|
142703
142703
|
return isSchemaEqual(a3.value, b5.value);
|
|
142704
|
+
} else if (a3.type === "nullable" && b5.type === "nullable") {
|
|
142705
|
+
return isSchemaEqual(a3.value, b5.value);
|
|
142704
142706
|
} else if (a3.type === "oneOf" && b5.type === "oneOf") {
|
|
142705
142707
|
return isOneOfEqual(a3.value, b5.value);
|
|
142706
142708
|
} else if (a3.type === "object" && b5.type === "object") {
|
|
@@ -622450,7 +622452,7 @@ var require_ReadmeGenerator = __commonJS({
|
|
|
622450
622452
|
docsLink: this.readmeConfig.apiReferenceLink
|
|
622451
622453
|
}));
|
|
622452
622454
|
}
|
|
622453
|
-
if (this.readmeConfig.requirements != null) {
|
|
622455
|
+
if (this.readmeConfig.requirements != null && this.readmeConfig.requirements.length > 0) {
|
|
622454
622456
|
blocks2.push(await this.generateRequirements({
|
|
622455
622457
|
requirements: this.readmeConfig.requirements
|
|
622456
622458
|
}));
|
|
@@ -702933,7 +702935,7 @@ var AccessTokenPosthogManager = class {
|
|
|
702933
702935
|
properties: {
|
|
702934
702936
|
...event,
|
|
702935
702937
|
...event.properties,
|
|
702936
|
-
version: "5.23.3-
|
|
702938
|
+
version: "5.23.3-1914-gc2c69d7cf16",
|
|
702937
702939
|
usingAccessToken: true,
|
|
702938
702940
|
...getRunIdProperties()
|
|
702939
702941
|
}
|
|
@@ -702999,7 +703001,7 @@ var UserPosthogManager = class {
|
|
|
702999
703001
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
703000
703002
|
event: "CLI",
|
|
703001
703003
|
properties: {
|
|
703002
|
-
version: "5.23.3-
|
|
703004
|
+
version: "5.23.3-1914-gc2c69d7cf16",
|
|
703003
703005
|
...event,
|
|
703004
703006
|
...event.properties,
|
|
703005
703007
|
usingAccessToken: false,
|
|
@@ -884381,7 +884383,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
884381
884383
|
var LOGS_FOLDER_NAME = "logs";
|
|
884382
884384
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
884383
884385
|
function getCliSource() {
|
|
884384
|
-
const version7 = "5.23.3-
|
|
884386
|
+
const version7 = "5.23.3-1914-gc2c69d7cf16";
|
|
884385
884387
|
return `cli@${version7}`;
|
|
884386
884388
|
}
|
|
884387
884389
|
var DebugLogger = class {
|
|
@@ -909701,7 +909703,7 @@ var LegacyDocsPublisher = class {
|
|
|
909701
909703
|
previewId,
|
|
909702
909704
|
disableTemplates: void 0,
|
|
909703
909705
|
skipUpload,
|
|
909704
|
-
cliVersion: "5.23.3-
|
|
909706
|
+
cliVersion: "5.23.3-1914-gc2c69d7cf16",
|
|
909705
909707
|
loginCommand: "fern auth login"
|
|
909706
909708
|
});
|
|
909707
909709
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -914818,7 +914820,7 @@ function buildSnippetTestGeneratorConfig(config5) {
|
|
|
914818
914820
|
}
|
|
914819
914821
|
|
|
914820
914822
|
// ../../../generators/csharp/codegen/lib/ast/core/Writer.js
|
|
914821
|
-
var Writer = class extends AbstractWriter {
|
|
914823
|
+
var Writer = class _Writer extends AbstractWriter {
|
|
914822
914824
|
/* Import statements */
|
|
914823
914825
|
references = {};
|
|
914824
914826
|
/* The namespace that is being written to */
|
|
@@ -914867,6 +914869,30 @@ var Writer = class extends AbstractWriter {
|
|
|
914867
914869
|
popTypeScope() {
|
|
914868
914870
|
this.typeScopeStack.pop();
|
|
914869
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
|
+
}
|
|
914870
914896
|
addNamespace(namespace) {
|
|
914871
914897
|
const foundNamespace = this.references[namespace];
|
|
914872
914898
|
if (foundNamespace == null) {
|
|
@@ -924307,6 +924333,30 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924307
924333
|
"thead",
|
|
924308
924334
|
"tbody"
|
|
924309
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
|
+
};
|
|
924310
924360
|
writer;
|
|
924311
924361
|
wrotePrefixOnCurrentLine = false;
|
|
924312
924362
|
constructor(writer2) {
|
|
@@ -924360,6 +924410,73 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924360
924410
|
writeNode(node4) {
|
|
924361
924411
|
this.writer.writeNode(node4);
|
|
924362
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
|
+
}
|
|
924363
924480
|
writeXmlNode(nodeName, text9) {
|
|
924364
924481
|
this.writePrefix();
|
|
924365
924482
|
this.writeOpenXmlNode(nodeName);
|
|
@@ -924409,7 +924526,7 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924409
924526
|
}
|
|
924410
924527
|
return match3;
|
|
924411
924528
|
});
|
|
924412
|
-
const escaped = withPlaceholders.replaceAll("<", "<").replaceAll(">", ">");
|
|
924529
|
+
const escaped = withPlaceholders.replace(_XmlDocWriter.BARE_AMPERSAND_PATTERN, "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
924413
924530
|
return escaped.replace(/\uE000(\d+)\uE000/g, (_5, index3) => tags[parseInt(index3, 10)] ?? "");
|
|
924414
924531
|
}
|
|
924415
924532
|
convertHtmlToXmlDoc(text9) {
|
|
@@ -924473,7 +924590,7 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924473
924590
|
case "a": {
|
|
924474
924591
|
const href = el.attribs.href;
|
|
924475
924592
|
if (href) {
|
|
924476
|
-
return `<see href="${href}">${children2}</see>`;
|
|
924593
|
+
return `<see href="${_XmlDocWriter.escapeXmlAttributeValue(href)}">${children2}</see>`;
|
|
924477
924594
|
}
|
|
924478
924595
|
return children2;
|
|
924479
924596
|
}
|
|
@@ -924503,7 +924620,7 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924503
924620
|
return children2;
|
|
924504
924621
|
default: {
|
|
924505
924622
|
if (_XmlDocWriter.SAFE_XML_DOC_TAGS.has(tag2)) {
|
|
924506
|
-
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("");
|
|
924507
924624
|
if (el.children.length === 0) {
|
|
924508
924625
|
return `<${el.name}${attrs}/>`;
|
|
924509
924626
|
}
|
|
@@ -924513,6 +924630,14 @@ var XmlDocWriter = class _XmlDocWriter {
|
|
|
924513
924630
|
}
|
|
924514
924631
|
}
|
|
924515
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
|
+
}
|
|
924516
924641
|
decodeHtmlEntities(text9) {
|
|
924517
924642
|
const entityMap = {
|
|
924518
924643
|
"+": "+",
|
|
@@ -929506,6 +929631,10 @@ var Generation = class {
|
|
|
929506
929631
|
rootNamespaceForCoreClasses: () => this.customConfig["root-namespace-for-core-classes"] ?? true,
|
|
929507
929632
|
/** Custom NuGet package identifier. Default: "" (uses root namespace). */
|
|
929508
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"] ?? {},
|
|
929509
929638
|
/** When true, generates enums that can handle unknown/future values gracefully. Default: true. */
|
|
929510
929639
|
isForwardCompatibleEnumsEnabled: () => this.customConfig["enable-forward-compatible-enums"] ?? this.customConfig["experimental-enable-forward-compatible-enums"] ?? true,
|
|
929511
929640
|
/** Mapping of websocket environment configurations. Default: {}. */
|
|
@@ -976945,7 +977074,7 @@ function getAutomationContextFromEnv() {
|
|
|
976945
977074
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
976946
977075
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
976947
977076
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
976948
|
-
cli_version: "5.23.3-
|
|
977077
|
+
cli_version: "5.23.3-1914-gc2c69d7cf16"
|
|
976949
977078
|
};
|
|
976950
977079
|
}
|
|
976951
977080
|
function isAutomationMode() {
|
|
@@ -977777,7 +977906,7 @@ var CliContext = class _CliContext {
|
|
|
977777
977906
|
if (false) {
|
|
977778
977907
|
this.logger.error("CLI_VERSION is not defined");
|
|
977779
977908
|
}
|
|
977780
|
-
return "5.23.3-
|
|
977909
|
+
return "5.23.3-1914-gc2c69d7cf16";
|
|
977781
977910
|
}
|
|
977782
977911
|
getCliName() {
|
|
977783
977912
|
if (false) {
|
package/package.json
CHANGED