fern-api 0.39.9 → 0.39.11
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/bundle.cjs +30 -12
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -1192625,7 +1192625,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1192625
1192625
|
properties: {
|
|
1192626
1192626
|
...event,
|
|
1192627
1192627
|
...event.properties,
|
|
1192628
|
-
version: "0.39.
|
|
1192628
|
+
version: "0.39.11",
|
|
1192629
1192629
|
usingAccessToken: true
|
|
1192630
1192630
|
}
|
|
1192631
1192631
|
});
|
|
@@ -1192687,7 +1192687,7 @@ var UserPosthogManager = class {
|
|
|
1192687
1192687
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1192688
1192688
|
event: "CLI",
|
|
1192689
1192689
|
properties: {
|
|
1192690
|
-
version: "0.39.
|
|
1192690
|
+
version: "0.39.11",
|
|
1192691
1192691
|
...event,
|
|
1192692
1192692
|
...event.properties
|
|
1192693
1192693
|
}
|
|
@@ -1207062,7 +1207062,8 @@ var HttpMethod4 = schemas_exports5.enum_(["GET", "POST", "PUT", "PATCH", "DELETE
|
|
|
1207062
1207062
|
var PathParameter2 = schemas_exports5.objectWithoutOptionalProperties({
|
|
1207063
1207063
|
name: schemas_exports5.string(),
|
|
1207064
1207064
|
schema: schemas_exports5.lazy(() => Schema3),
|
|
1207065
|
-
variableReference: schemas_exports5.string().optional()
|
|
1207065
|
+
variableReference: schemas_exports5.string().optional(),
|
|
1207066
|
+
parameterNameOverride: schemas_exports5.string().optional()
|
|
1207066
1207067
|
}).extend(WithDescription).extend(WithAvailability).extend(WithSource);
|
|
1207067
1207068
|
|
|
1207068
1207069
|
// ../openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/QueryParameter.js
|
|
@@ -1207216,6 +1207217,7 @@ var FernExample = schemas_exports5.unknown();
|
|
|
1207216
1207217
|
// ../openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/PathParameterExample.js
|
|
1207217
1207218
|
var PathParameterExample = schemas_exports5.objectWithoutOptionalProperties({
|
|
1207218
1207219
|
name: schemas_exports5.string(),
|
|
1207220
|
+
parameterNameOverride: schemas_exports5.string().optional(),
|
|
1207219
1207221
|
value: schemas_exports5.lazy(() => FullExample2)
|
|
1207220
1207222
|
});
|
|
1207221
1207223
|
|
|
@@ -1207792,7 +1207794,8 @@ var WebsocketHandshakeWithExample = schemas_exports5.objectWithoutOptionalProper
|
|
|
1207792
1207794
|
var PathParameterWithExample = schemas_exports5.objectWithoutOptionalProperties({
|
|
1207793
1207795
|
name: schemas_exports5.string(),
|
|
1207794
1207796
|
schema: schemas_exports5.lazy(() => SchemaWithExample2),
|
|
1207795
|
-
variableReference: schemas_exports5.string().optional()
|
|
1207797
|
+
variableReference: schemas_exports5.string().optional(),
|
|
1207798
|
+
parameterNameOverride: schemas_exports5.string().optional()
|
|
1207796
1207799
|
}).extend(WithDescription).extend(WithAvailability).extend(WithSource);
|
|
1207797
1207800
|
|
|
1207798
1207801
|
// ../openapi-ir-sdk/lib/sdk/serialization/resources/parseIr/types/JsonRequestWithExample.js
|
|
@@ -1213247,6 +1213250,7 @@ var ExampleEndpointFactory = class {
|
|
|
1213247
1213250
|
} else if (example != null) {
|
|
1213248
1213251
|
pathParameters.push({
|
|
1213249
1213252
|
name: pathParameter.name,
|
|
1213253
|
+
parameterNameOverride: pathParameter.parameterNameOverride,
|
|
1213250
1213254
|
value: example
|
|
1213251
1213255
|
});
|
|
1213252
1213256
|
}
|
|
@@ -1213814,6 +1213818,7 @@ function parseAsyncAPI({ document: document4, taskContext, options: options2, so
|
|
|
1213814
1213818
|
pathParameters.push({
|
|
1213815
1213819
|
name: name2,
|
|
1213816
1213820
|
description: parameter.description,
|
|
1213821
|
+
parameterNameOverride: void 0,
|
|
1213817
1213822
|
schema: parameter.schema != null ? convertSchema(parameter.schema, false, context, breadcrumbs, source, namespace) : SchemaWithExample.primitive({
|
|
1213818
1213823
|
schema: PrimitiveSchemaValueWithExample.string({
|
|
1213819
1213824
|
default: void 0,
|
|
@@ -1213938,6 +1213943,7 @@ function parseAsyncAPI({ document: document4, taskContext, options: options2, so
|
|
|
1213938
1213943
|
pathParameters: pathParameters.map((param) => {
|
|
1213939
1213944
|
return {
|
|
1213940
1213945
|
...param,
|
|
1213946
|
+
parameterNameOverride: void 0,
|
|
1213941
1213947
|
schema: convertSchemaWithExampleToSchema(param.schema)
|
|
1213942
1213948
|
};
|
|
1213943
1213949
|
})
|
|
@@ -1216192,6 +1216198,7 @@ function generateIr({ openApi, taskContext, options: options2, source, namespace
|
|
|
1216192
1216198
|
description: pathParameter.description,
|
|
1216193
1216199
|
name: pathParameter.name,
|
|
1216194
1216200
|
schema: convertSchemaWithExampleToSchema(pathParameter.schema),
|
|
1216201
|
+
parameterNameOverride: pathParameter.parameterNameOverride,
|
|
1216195
1216202
|
variableReference: pathParameter.variableReference,
|
|
1216196
1216203
|
availability: pathParameter.availability,
|
|
1216197
1216204
|
source: pathParameter.source
|
|
@@ -1217388,7 +1217395,7 @@ function buildEndpointExample({ endpointExample, context }) {
|
|
|
1217388
1217395
|
example.docs = endpointExample.description;
|
|
1217389
1217396
|
}
|
|
1217390
1217397
|
if (endpointExample.pathParameters != null && endpointExample.pathParameters.length > 0) {
|
|
1217391
|
-
example["path-parameters"] =
|
|
1217398
|
+
example["path-parameters"] = convertPathParameterExample(endpointExample.pathParameters);
|
|
1217392
1217399
|
}
|
|
1217393
1217400
|
if (endpointExample.queryParameters != null && endpointExample.queryParameters.length > 0) {
|
|
1217394
1217401
|
example["query-parameters"] = convertQueryParameterExample2(endpointExample.queryParameters);
|
|
@@ -1217427,9 +1217434,14 @@ function buildEndpointExample({ endpointExample, context }) {
|
|
|
1217427
1217434
|
}
|
|
1217428
1217435
|
return example;
|
|
1217429
1217436
|
}
|
|
1217430
|
-
function
|
|
1217437
|
+
function convertPathParameterExample(pathParameterExamples) {
|
|
1217431
1217438
|
const result = {};
|
|
1217432
|
-
|
|
1217439
|
+
pathParameterExamples.forEach((pathParameterExample) => {
|
|
1217440
|
+
const convertedExample = convertFullExample2(pathParameterExample.value);
|
|
1217441
|
+
if (convertedExample != null) {
|
|
1217442
|
+
result[pathParameterExample.parameterNameOverride ?? pathParameterExample.name] = convertedExample;
|
|
1217443
|
+
}
|
|
1217444
|
+
});
|
|
1217433
1217445
|
return result;
|
|
1217434
1217446
|
}
|
|
1217435
1217447
|
function convertQueryParameterExample2(namedFullExamples) {
|
|
@@ -1217486,9 +1217498,13 @@ function buildEndpoint({ endpoint, declarationFile, context }) {
|
|
|
1217486
1217498
|
const { nonRequestReferencedSchemas } = context.ir;
|
|
1217487
1217499
|
let schemaIdsToExclude = [];
|
|
1217488
1217500
|
const names2 = /* @__PURE__ */ new Set();
|
|
1217501
|
+
let path45 = endpoint.path;
|
|
1217489
1217502
|
const pathParameters = {};
|
|
1217490
1217503
|
for (const pathParameter of endpoint.pathParameters) {
|
|
1217491
|
-
|
|
1217504
|
+
if (pathParameter.parameterNameOverride) {
|
|
1217505
|
+
path45 = path45.replace(pathParameter.name, pathParameter.parameterNameOverride);
|
|
1217506
|
+
}
|
|
1217507
|
+
pathParameters[pathParameter.parameterNameOverride ?? pathParameter.name] = buildPathParameter({
|
|
1217492
1217508
|
pathParameter,
|
|
1217493
1217509
|
context,
|
|
1217494
1217510
|
fileContainingReference: declarationFile
|
|
@@ -1217526,7 +1217542,7 @@ function buildEndpoint({ endpoint, declarationFile, context }) {
|
|
|
1217526
1217542
|
}
|
|
1217527
1217543
|
}
|
|
1217528
1217544
|
const convertedEndpoint = {
|
|
1217529
|
-
path:
|
|
1217545
|
+
path: path45,
|
|
1217530
1217546
|
method: convertToHttpMethod(endpoint.method),
|
|
1217531
1217547
|
auth: endpoint.authed,
|
|
1217532
1217548
|
docs: endpoint.description ?? void 0,
|
|
@@ -1222798,10 +1222814,10 @@ var CliContext = class {
|
|
|
1222798
1222814
|
return "fern-api";
|
|
1222799
1222815
|
}
|
|
1222800
1222816
|
getPackageVersion() {
|
|
1222801
|
-
if ("0.39.
|
|
1222817
|
+
if ("0.39.11" == null) {
|
|
1222802
1222818
|
this.logger.error("CLI_VERSION is not defined");
|
|
1222803
1222819
|
}
|
|
1222804
|
-
return "0.39.
|
|
1222820
|
+
return "0.39.11";
|
|
1222805
1222821
|
}
|
|
1222806
1222822
|
getCliName() {
|
|
1222807
1222823
|
if ("fern" == null) {
|
|
@@ -1305893,7 +1305909,9 @@ async function tryRunDocker({ docker, imageName, args, binds, removeAfterComplet
|
|
|
1305893
1305909
|
setImmediate(callback);
|
|
1305894
1305910
|
}
|
|
1305895
1305911
|
}), {
|
|
1305896
|
-
|
|
1305912
|
+
HostConfig: {
|
|
1305913
|
+
Binds: binds
|
|
1305914
|
+
},
|
|
1305897
1305915
|
User: "root"
|
|
1305898
1305916
|
});
|
|
1305899
1305917
|
if (removeAfterCompletion) {
|