@fern-api/fern-api-dev 4.37.7 → 4.37.9
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 +96 -9
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -504530,6 +504530,76 @@ function parseAsyncAPIV3({ context: context2, breadcrumbs, source: source2, asyn
|
|
|
504530
504530
|
}
|
|
504531
504531
|
}
|
|
504532
504532
|
}
|
|
504533
|
+
if (channel.bindings?.ws?.query != null) {
|
|
504534
|
+
const queryParamNames = new Set(queryParameters.map((qp4) => qp4.name));
|
|
504535
|
+
const requiredSet = new Set(channel.bindings.ws.query.required ?? []);
|
|
504536
|
+
for (const [name2, schema2] of Object.entries(channel.bindings.ws.query.properties ?? {})) {
|
|
504537
|
+
if (queryParamNames.has(name2)) {
|
|
504538
|
+
continue;
|
|
504539
|
+
}
|
|
504540
|
+
if (isReferenceObject(schema2)) {
|
|
504541
|
+
const resolvedSchema = context2.resolveSchemaReference(schema2);
|
|
504542
|
+
const isRequired3 = requiredSet.has(name2);
|
|
504543
|
+
const [isOptional2, isNullable2] = context2.options.coerceOptionalSchemasToNullable ? [false, !isRequired3] : [!isRequired3, false];
|
|
504544
|
+
queryParameters.push({
|
|
504545
|
+
name: name2,
|
|
504546
|
+
schema: convertReferenceObject(schema2, isOptional2, isNullable2, context2, [channelPath, name2], void 0, source2, context2.namespace),
|
|
504547
|
+
description: resolvedSchema.description,
|
|
504548
|
+
parameterNameOverride: void 0,
|
|
504549
|
+
availability: convertAvailability2(resolvedSchema),
|
|
504550
|
+
source: source2,
|
|
504551
|
+
explode: void 0
|
|
504552
|
+
});
|
|
504553
|
+
continue;
|
|
504554
|
+
}
|
|
504555
|
+
const isRequired2 = requiredSet.has(name2);
|
|
504556
|
+
const [isOptional, isNullable] = context2.options.coerceOptionalSchemasToNullable ? [false, !isRequired2] : [!isRequired2, false];
|
|
504557
|
+
queryParameters.push({
|
|
504558
|
+
name: name2,
|
|
504559
|
+
schema: convertSchema2(schema2, isOptional, isNullable, context2, [channelPath, name2], source2, context2.namespace),
|
|
504560
|
+
description: schema2.description,
|
|
504561
|
+
parameterNameOverride: void 0,
|
|
504562
|
+
availability: convertAvailability2(schema2),
|
|
504563
|
+
source: source2,
|
|
504564
|
+
explode: void 0
|
|
504565
|
+
});
|
|
504566
|
+
}
|
|
504567
|
+
}
|
|
504568
|
+
if (channel.bindings?.ws?.headers != null) {
|
|
504569
|
+
const headerNames = new Set(headers2.map((h14) => h14.name));
|
|
504570
|
+
const requiredSet = new Set(channel.bindings.ws.headers.required ?? []);
|
|
504571
|
+
for (const [name2, schema2] of Object.entries(channel.bindings.ws.headers.properties ?? {})) {
|
|
504572
|
+
if (headerNames.has(name2)) {
|
|
504573
|
+
continue;
|
|
504574
|
+
}
|
|
504575
|
+
if (isReferenceObject(schema2)) {
|
|
504576
|
+
const resolvedSchema = context2.resolveSchemaReference(schema2);
|
|
504577
|
+
const isRequired3 = requiredSet.has(name2);
|
|
504578
|
+
const [isOptional2, isNullable2] = context2.options.coerceOptionalSchemasToNullable ? [false, !isRequired3] : [!isRequired3, false];
|
|
504579
|
+
headers2.push({
|
|
504580
|
+
name: name2,
|
|
504581
|
+
schema: convertReferenceObject(schema2, isOptional2, isNullable2, context2, [channelPath, name2], void 0, source2, context2.namespace),
|
|
504582
|
+
description: resolvedSchema.description,
|
|
504583
|
+
parameterNameOverride: void 0,
|
|
504584
|
+
env: void 0,
|
|
504585
|
+
availability: convertAvailability2(resolvedSchema),
|
|
504586
|
+
source: source2
|
|
504587
|
+
});
|
|
504588
|
+
continue;
|
|
504589
|
+
}
|
|
504590
|
+
const isRequired2 = requiredSet.has(name2);
|
|
504591
|
+
const [isOptional, isNullable] = context2.options.coerceOptionalSchemasToNullable ? [false, !isRequired2] : [!isRequired2, false];
|
|
504592
|
+
headers2.push({
|
|
504593
|
+
name: name2,
|
|
504594
|
+
schema: convertSchema2(schema2, isOptional, isNullable, context2, [channelPath, name2], source2, context2.namespace),
|
|
504595
|
+
description: schema2.description,
|
|
504596
|
+
parameterNameOverride: void 0,
|
|
504597
|
+
env: void 0,
|
|
504598
|
+
availability: convertAvailability2(schema2),
|
|
504599
|
+
source: source2
|
|
504600
|
+
});
|
|
504601
|
+
}
|
|
504602
|
+
}
|
|
504533
504603
|
if (headers2.length > 0 || queryParameters.length > 0 || channelEvents[channelPath] != null && (channelEvents[channelPath].publish != null || channelEvents[channelPath].subscribe != null)) {
|
|
504534
504604
|
const fernExamples = getFernExamples(channel);
|
|
504535
504605
|
const messages2 = channelEvents[channelPath]?.__parsedMessages ?? [];
|
|
@@ -581497,7 +581567,7 @@ var AccessTokenPosthogManager = class {
|
|
|
581497
581567
|
properties: {
|
|
581498
581568
|
...event,
|
|
581499
581569
|
...event.properties,
|
|
581500
|
-
version: "4.37.
|
|
581570
|
+
version: "4.37.9",
|
|
581501
581571
|
usingAccessToken: true
|
|
581502
581572
|
}
|
|
581503
581573
|
});
|
|
@@ -581548,7 +581618,7 @@ var UserPosthogManager = class {
|
|
|
581548
581618
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
581549
581619
|
event: "CLI",
|
|
581550
581620
|
properties: {
|
|
581551
|
-
version: "4.37.
|
|
581621
|
+
version: "4.37.9",
|
|
581552
581622
|
...event,
|
|
581553
581623
|
...event.properties,
|
|
581554
581624
|
usingAccessToken: false,
|
|
@@ -787651,7 +787721,7 @@ var import_path51 = __toESM(require("path"), 1);
|
|
|
787651
787721
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
787652
787722
|
var LOGS_FOLDER_NAME = "logs";
|
|
787653
787723
|
function getCliSource() {
|
|
787654
|
-
const version8 = "4.37.
|
|
787724
|
+
const version8 = "4.37.9";
|
|
787655
787725
|
return `cli@${version8}`;
|
|
787656
787726
|
}
|
|
787657
787727
|
var DebugLogger = class {
|
|
@@ -798446,7 +798516,7 @@ var LegacyDocsPublisher = class {
|
|
|
798446
798516
|
previewId: void 0,
|
|
798447
798517
|
disableTemplates: void 0,
|
|
798448
798518
|
skipUpload,
|
|
798449
|
-
cliVersion: "4.37.
|
|
798519
|
+
cliVersion: "4.37.9"
|
|
798450
798520
|
});
|
|
798451
798521
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
798452
798522
|
return { success: false };
|
|
@@ -848869,7 +848939,7 @@ function extractLanguageFromGeneratorName(generatorName) {
|
|
|
848869
848939
|
if (name2.includes("typescript") || name2.includes("ts-sdk") || name2.includes("node-sdk")) {
|
|
848870
848940
|
return "typescript";
|
|
848871
848941
|
}
|
|
848872
|
-
if (name2.includes("python")) {
|
|
848942
|
+
if (name2.includes("python") || name2.includes("pydantic") || name2.includes("fastapi")) {
|
|
848873
848943
|
return "python";
|
|
848874
848944
|
}
|
|
848875
848945
|
if (name2.includes("java") && !name2.includes("javascript")) {
|
|
@@ -848899,6 +848969,20 @@ function extractLanguageFromGeneratorName(generatorName) {
|
|
|
848899
848969
|
return "unknown";
|
|
848900
848970
|
}
|
|
848901
848971
|
var AUTO_VERSION = "AUTO";
|
|
848972
|
+
var MAGIC_VERSION = "0.0.0-fern-placeholder";
|
|
848973
|
+
var MAGIC_VERSION_PYTHON = "0.0.0.dev0";
|
|
848974
|
+
function mapMagicVersionForLanguage(magicVersion, language) {
|
|
848975
|
+
if (magicVersion !== MAGIC_VERSION) {
|
|
848976
|
+
return magicVersion;
|
|
848977
|
+
}
|
|
848978
|
+
if (language === "go") {
|
|
848979
|
+
return `v${magicVersion}`;
|
|
848980
|
+
}
|
|
848981
|
+
if (language === "python") {
|
|
848982
|
+
return MAGIC_VERSION_PYTHON;
|
|
848983
|
+
}
|
|
848984
|
+
return magicVersion;
|
|
848985
|
+
}
|
|
848902
848986
|
var MAX_AI_DIFF_BYTES = 4e4;
|
|
848903
848987
|
var MAX_CHUNKS = 40;
|
|
848904
848988
|
var MAX_RAW_DIFF_BYTES = 1e7;
|
|
@@ -849546,11 +849630,14 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
|
|
|
849546
849630
|
snippetPath: absolutePathToTmpSnippetJSON,
|
|
849547
849631
|
snippetTemplatePath: absolutePathToTmpSnippetTemplatesJSON
|
|
849548
849632
|
};
|
|
849633
|
+
const generatorLanguage = generatorInvocation.language ?? extractLanguageFromGeneratorName(generatorInvocation.name);
|
|
849634
|
+
const mappedVersion = version8 != null ? mapMagicVersionForLanguage(version8, generatorLanguage) : version8;
|
|
849635
|
+
const mappedOutputVersionOverride = outputVersionOverride != null ? mapMagicVersionForLanguage(outputVersionOverride, generatorLanguage) : outputVersionOverride;
|
|
849549
849636
|
const config3 = getGeneratorConfig({
|
|
849550
849637
|
generatorInvocation,
|
|
849551
849638
|
customConfig: generatorInvocation.config,
|
|
849552
849639
|
workspaceName: workspace.definition.rootApiFile.contents.name,
|
|
849553
|
-
outputVersion:
|
|
849640
|
+
outputVersion: mappedOutputVersionOverride,
|
|
849554
849641
|
organization,
|
|
849555
849642
|
absolutePathToSnippet: absolutePathToTmpSnippetJSON,
|
|
849556
849643
|
absolutePathToSnippetTemplates: absolutePathToTmpSnippetTemplatesJSON,
|
|
@@ -849588,11 +849675,11 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
|
|
|
849588
849675
|
absolutePathToLocalSnippetTemplateJSON,
|
|
849589
849676
|
absolutePathToTmpSnippetJSON,
|
|
849590
849677
|
absolutePathToTmpSnippetTemplatesJSON,
|
|
849591
|
-
version:
|
|
849678
|
+
version: mappedVersion,
|
|
849592
849679
|
ai: ai7,
|
|
849593
849680
|
isWhitelabel: ir15.readmeConfig?.whiteLabel ?? false,
|
|
849594
849681
|
autoVersioningCache,
|
|
849595
|
-
generatorLanguage
|
|
849682
|
+
generatorLanguage,
|
|
849596
849683
|
absolutePathToSpecRepo
|
|
849597
849684
|
});
|
|
849598
849685
|
const generatedFilesResult = await taskHandler.copyGeneratedFiles();
|
|
@@ -871004,7 +871091,7 @@ var CliContext = class {
|
|
|
871004
871091
|
if (false) {
|
|
871005
871092
|
this.logger.error("CLI_VERSION is not defined");
|
|
871006
871093
|
}
|
|
871007
|
-
return "4.37.
|
|
871094
|
+
return "4.37.9";
|
|
871008
871095
|
}
|
|
871009
871096
|
getCliName() {
|
|
871010
871097
|
if (false) {
|
package/package.json
CHANGED