@fern-api/fern-api-dev 5.36.0 → 5.36.1
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 +55 -16
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -654592,12 +654592,14 @@ var AbstractOperationConverter = class extends AbstractConverter {
|
|
|
654592
654592
|
operation;
|
|
654593
654593
|
method;
|
|
654594
654594
|
path;
|
|
654595
|
+
pathItemParameters;
|
|
654595
654596
|
inlinedTypes = {};
|
|
654596
|
-
constructor({ context: context3, breadcrumbs, operation, method: method8, path: path115 }) {
|
|
654597
|
+
constructor({ context: context3, breadcrumbs, operation, method: method8, path: path115, pathItemParameters }) {
|
|
654597
654598
|
super({ context: context3, breadcrumbs });
|
|
654598
654599
|
this.operation = operation;
|
|
654599
654600
|
this.method = method8;
|
|
654600
654601
|
this.path = path115;
|
|
654602
|
+
this.pathItemParameters = pathItemParameters ?? [];
|
|
654601
654603
|
}
|
|
654602
654604
|
convertHttpMethod() {
|
|
654603
654605
|
switch (this.method) {
|
|
@@ -654621,11 +654623,12 @@ var AbstractOperationConverter = class extends AbstractConverter {
|
|
|
654621
654623
|
const pathParameters = [];
|
|
654622
654624
|
const queryParameters = [];
|
|
654623
654625
|
const headers2 = [];
|
|
654624
|
-
|
|
654626
|
+
const mergedParameters = this.mergeParameters(this.pathItemParameters, this.operation.parameters ?? []);
|
|
654627
|
+
if (mergedParameters.length === 0) {
|
|
654625
654628
|
this.checkMissingPathParameters(pathParameters);
|
|
654626
654629
|
return { pathParameters, queryParameters, headers: headers2 };
|
|
654627
654630
|
}
|
|
654628
|
-
for (const parameter6 of
|
|
654631
|
+
for (const parameter6 of mergedParameters) {
|
|
654629
654632
|
const resolvedParameter = this.context.resolveMaybeReference({
|
|
654630
654633
|
schemaOrReference: parameter6,
|
|
654631
654634
|
breadcrumbs
|
|
@@ -654681,6 +654684,39 @@ var AbstractOperationConverter = class extends AbstractConverter {
|
|
|
654681
654684
|
this.checkMissingPathParameters(pathParameters);
|
|
654682
654685
|
return { pathParameters, queryParameters, headers: headers2 };
|
|
654683
654686
|
}
|
|
654687
|
+
/**
|
|
654688
|
+
* Per the OpenAPI spec, path-level parameters are inherited by all operations
|
|
654689
|
+
* unless overridden by an operation-level parameter with the same name and location.
|
|
654690
|
+
*/
|
|
654691
|
+
mergeParameters(pathItemParams, operationParams) {
|
|
654692
|
+
if (pathItemParams.length === 0) {
|
|
654693
|
+
return operationParams;
|
|
654694
|
+
}
|
|
654695
|
+
if (operationParams.length === 0) {
|
|
654696
|
+
return pathItemParams;
|
|
654697
|
+
}
|
|
654698
|
+
const resolvedOperationParams = /* @__PURE__ */ new Set();
|
|
654699
|
+
for (const param of operationParams) {
|
|
654700
|
+
const resolved = this.context.resolveMaybeReference({
|
|
654701
|
+
schemaOrReference: param,
|
|
654702
|
+
breadcrumbs: this.breadcrumbs
|
|
654703
|
+
});
|
|
654704
|
+
if (resolved != null) {
|
|
654705
|
+
resolvedOperationParams.add(`${resolved.in}:${resolved.name}`);
|
|
654706
|
+
}
|
|
654707
|
+
}
|
|
654708
|
+
const inheritedParams = pathItemParams.filter((param) => {
|
|
654709
|
+
const resolved = this.context.resolveMaybeReference({
|
|
654710
|
+
schemaOrReference: param,
|
|
654711
|
+
breadcrumbs: this.breadcrumbs
|
|
654712
|
+
});
|
|
654713
|
+
if (resolved == null) {
|
|
654714
|
+
return false;
|
|
654715
|
+
}
|
|
654716
|
+
return !resolvedOperationParams.has(`${resolved.in}:${resolved.name}`);
|
|
654717
|
+
});
|
|
654718
|
+
return [...inheritedParams, ...operationParams];
|
|
654719
|
+
}
|
|
654684
654720
|
checkMissingPathParameters(pathParameters) {
|
|
654685
654721
|
const pathParams = [...this.path.matchAll(PATH_PARAM_REGEX)].map((match3) => match3[1]);
|
|
654686
654722
|
const missingPathParams = pathParams.filter((param) => !pathParameters.some((p14) => getOriginalName(p14.name) === param));
|
|
@@ -654838,8 +654874,8 @@ function isHeaderAuthScheme3(scheme) {
|
|
|
654838
654874
|
|
|
654839
654875
|
// ../api-importers/openapi-to-ir/lib/3.1/paths/operations/WebhookConverter.js
|
|
654840
654876
|
var WebhookConverter = class extends AbstractOperationConverter {
|
|
654841
|
-
constructor({ context: context3, breadcrumbs, operation, method: method8, path: path115 }) {
|
|
654842
|
-
super({ context: context3, breadcrumbs, operation, method: method8, path: path115 });
|
|
654877
|
+
constructor({ context: context3, breadcrumbs, operation, method: method8, path: path115, pathItemParameters }) {
|
|
654878
|
+
super({ context: context3, breadcrumbs, operation, method: method8, path: path115, pathItemParameters });
|
|
654843
654879
|
}
|
|
654844
654880
|
convert() {
|
|
654845
654881
|
if (this.operation.requestBody == null) {
|
|
@@ -656155,8 +656191,8 @@ var OperationConverter = class _OperationConverter extends AbstractOperationConv
|
|
|
656155
656191
|
pathLevelServers;
|
|
656156
656192
|
streamingExtension;
|
|
656157
656193
|
static AUTHORIZATION_HEADER = "Authorization";
|
|
656158
|
-
constructor({ context: context3, breadcrumbs, operation, method: method8, path: path115, idempotent, idToAuthScheme, topLevelServers, pathLevelServers, streamingExtension }) {
|
|
656159
|
-
super({ context: context3, breadcrumbs, operation, method: method8, path: path115 });
|
|
656194
|
+
constructor({ context: context3, breadcrumbs, operation, method: method8, path: path115, pathItemParameters, idempotent, idToAuthScheme, topLevelServers, pathLevelServers, streamingExtension }) {
|
|
656195
|
+
super({ context: context3, breadcrumbs, operation, method: method8, path: path115, pathItemParameters });
|
|
656160
656196
|
this.idempotent = idempotent;
|
|
656161
656197
|
this.idToAuthScheme = idToAuthScheme;
|
|
656162
656198
|
this.topLevelServers = topLevelServers;
|
|
@@ -656359,12 +656395,13 @@ var OperationConverter = class _OperationConverter extends AbstractOperationConv
|
|
|
656359
656395
|
* populating the IR filter graph with empty maps.
|
|
656360
656396
|
*/
|
|
656361
656397
|
collectQueryParameterAudiences({ breadcrumbs }) {
|
|
656362
|
-
|
|
656398
|
+
const mergedParameters = this.mergeParameters(this.pathItemParameters, this.operation.parameters ?? []);
|
|
656399
|
+
if (mergedParameters.length === 0) {
|
|
656363
656400
|
return void 0;
|
|
656364
656401
|
}
|
|
656365
656402
|
const audiencesByQueryParameter = {};
|
|
656366
656403
|
let foundAny = false;
|
|
656367
|
-
for (const parameter6 of
|
|
656404
|
+
for (const parameter6 of mergedParameters) {
|
|
656368
656405
|
const resolved = this.context.resolveMaybeReference({
|
|
656369
656406
|
schemaOrReference: parameter6,
|
|
656370
656407
|
breadcrumbs,
|
|
@@ -657025,7 +657062,8 @@ var PathConverter = class extends AbstractConverter {
|
|
|
657025
657062
|
breadcrumbs: operationBreadcrumbs,
|
|
657026
657063
|
operation,
|
|
657027
657064
|
method: import_openapi_types.OpenAPIV3.HttpMethods[method8.toUpperCase()],
|
|
657028
|
-
path: this.path
|
|
657065
|
+
path: this.path,
|
|
657066
|
+
pathItemParameters: this.pathItem.parameters
|
|
657029
657067
|
});
|
|
657030
657068
|
return webhookConverter.convert();
|
|
657031
657069
|
}
|
|
@@ -657079,6 +657117,7 @@ var PathConverter = class extends AbstractConverter {
|
|
|
657079
657117
|
operation,
|
|
657080
657118
|
method: import_openapi_types.OpenAPIV3.HttpMethods[method8.toUpperCase()],
|
|
657081
657119
|
path: this.path,
|
|
657120
|
+
pathItemParameters: this.pathItem.parameters,
|
|
657082
657121
|
idempotent: isIdempotent,
|
|
657083
657122
|
idToAuthScheme: this.idToAuthScheme,
|
|
657084
657123
|
topLevelServers: this.topLevelServers,
|
|
@@ -669084,7 +669123,7 @@ var AccessTokenPosthogManager = class {
|
|
|
669084
669123
|
properties: {
|
|
669085
669124
|
...event,
|
|
669086
669125
|
...event.properties,
|
|
669087
|
-
version: "5.36.
|
|
669126
|
+
version: "5.36.1",
|
|
669088
669127
|
usingAccessToken: true,
|
|
669089
669128
|
...getRunIdProperties()
|
|
669090
669129
|
}
|
|
@@ -669148,7 +669187,7 @@ var UserPosthogManager = class {
|
|
|
669148
669187
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
669149
669188
|
event: "CLI",
|
|
669150
669189
|
properties: {
|
|
669151
|
-
version: "5.36.
|
|
669190
|
+
version: "5.36.1",
|
|
669152
669191
|
...event,
|
|
669153
669192
|
...event.properties,
|
|
669154
669193
|
usingAccessToken: false,
|
|
@@ -861014,7 +861053,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
861014
861053
|
var LOGS_FOLDER_NAME = "logs";
|
|
861015
861054
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
861016
861055
|
function getCliSource() {
|
|
861017
|
-
const version7 = "5.36.
|
|
861056
|
+
const version7 = "5.36.1";
|
|
861018
861057
|
return `cli@${version7}`;
|
|
861019
861058
|
}
|
|
861020
861059
|
var DebugLogger = class {
|
|
@@ -879886,7 +879925,7 @@ var LegacyDocsPublisher = class {
|
|
|
879886
879925
|
previewId,
|
|
879887
879926
|
disableTemplates: void 0,
|
|
879888
879927
|
skipUpload,
|
|
879889
|
-
cliVersion: "5.36.
|
|
879928
|
+
cliVersion: "5.36.1",
|
|
879890
879929
|
loginCommand: "fern auth login"
|
|
879891
879930
|
});
|
|
879892
879931
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -954744,7 +954783,7 @@ function getAutomationContextFromEnv() {
|
|
|
954744
954783
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
954745
954784
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
954746
954785
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
954747
|
-
cli_version: "5.36.
|
|
954786
|
+
cli_version: "5.36.1"
|
|
954748
954787
|
};
|
|
954749
954788
|
}
|
|
954750
954789
|
function isAutomationMode() {
|
|
@@ -955570,7 +955609,7 @@ var CliContext = class _CliContext {
|
|
|
955570
955609
|
if (false) {
|
|
955571
955610
|
this.logger.error("CLI_VERSION is not defined");
|
|
955572
955611
|
}
|
|
955573
|
-
return "5.36.
|
|
955612
|
+
return "5.36.1";
|
|
955574
955613
|
}
|
|
955575
955614
|
getCliName() {
|
|
955576
955615
|
if (false) {
|
package/package.json
CHANGED