fern-api 0.15.4-rc0 → 0.15.4
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 +22 -9
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -718941,7 +718941,7 @@ var AccessTokenPosthogManager = class {
|
|
|
718941
718941
|
properties: {
|
|
718942
718942
|
...event,
|
|
718943
718943
|
...event.properties,
|
|
718944
|
-
version: "0.15.4
|
|
718944
|
+
version: "0.15.4",
|
|
718945
718945
|
usingAccessToken: true
|
|
718946
718946
|
}
|
|
718947
718947
|
});
|
|
@@ -719003,7 +719003,7 @@ var UserPosthogManager = class {
|
|
|
719003
719003
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
719004
719004
|
event: "CLI",
|
|
719005
719005
|
properties: {
|
|
719006
|
-
version: "0.15.4
|
|
719006
|
+
version: "0.15.4",
|
|
719007
719007
|
...event,
|
|
719008
719008
|
...event.properties
|
|
719009
719009
|
}
|
|
@@ -743249,10 +743249,10 @@ var CliContext = class {
|
|
|
743249
743249
|
return "fern-api";
|
|
743250
743250
|
}
|
|
743251
743251
|
getPackageVersion() {
|
|
743252
|
-
if ("0.15.4
|
|
743252
|
+
if ("0.15.4" == null) {
|
|
743253
743253
|
this.logger.error("CLI_VERSION is not defined");
|
|
743254
743254
|
}
|
|
743255
|
-
return "0.15.4
|
|
743255
|
+
return "0.15.4";
|
|
743256
743256
|
}
|
|
743257
743257
|
getCliName() {
|
|
743258
743258
|
if ("fern" == null) {
|
|
@@ -745541,11 +745541,20 @@ function convertSingleUnionType({ rawValueType, rawSingleUnionType, fileContaini
|
|
|
745541
745541
|
|
|
745542
745542
|
// pnp:/home/circleci/project/packages/cli/generation/ir-generator/lib/converters/services/convertExampleEndpointCall.js
|
|
745543
745543
|
function convertExampleEndpointCall2({ service, endpoint, example, typeResolver, errorResolver, exampleResolver, variableResolver, file }) {
|
|
745544
|
+
const convertedPathParameters = convertPathParameters({
|
|
745545
|
+
service,
|
|
745546
|
+
endpoint,
|
|
745547
|
+
example,
|
|
745548
|
+
typeResolver,
|
|
745549
|
+
exampleResolver,
|
|
745550
|
+
variableResolver,
|
|
745551
|
+
file
|
|
745552
|
+
});
|
|
745544
745553
|
return {
|
|
745545
745554
|
name: example.name != null ? file.casingsGenerator.generateName(example.name) : void 0,
|
|
745546
745555
|
docs: example.docs,
|
|
745547
|
-
url: buildUrl({ service, endpoint, example }),
|
|
745548
|
-
...
|
|
745556
|
+
url: buildUrl({ service, endpoint, example, pathParams: convertedPathParameters }),
|
|
745557
|
+
...convertedPathParameters,
|
|
745549
745558
|
...convertHeaders({ service, endpoint, example, typeResolver, exampleResolver, file }),
|
|
745550
745559
|
queryParameters: example["query-parameters"] != null ? Object.entries(example["query-parameters"]).map(([wireKey, value]) => {
|
|
745551
745560
|
var _a2, _b2;
|
|
@@ -745788,11 +745797,15 @@ function convertExampleResponseBody({ endpoint, example, typeResolver, exampleRe
|
|
|
745788
745797
|
fileContainingExample: file
|
|
745789
745798
|
});
|
|
745790
745799
|
}
|
|
745791
|
-
function buildUrl({ service, endpoint, example }) {
|
|
745800
|
+
function buildUrl({ service, endpoint, example, pathParams }) {
|
|
745792
745801
|
let url = service["base-path"] + endpoint.path;
|
|
745793
745802
|
if (example["path-parameters"] != null) {
|
|
745794
|
-
for (const
|
|
745795
|
-
|
|
745803
|
+
for (const parameter of [
|
|
745804
|
+
...pathParams.endpointPathParameters,
|
|
745805
|
+
...pathParams.servicePathParameters,
|
|
745806
|
+
...pathParams.rootPathParameters
|
|
745807
|
+
]) {
|
|
745808
|
+
url = url.replaceAll(`{${parameter.name.originalName}}`, `${parameter.value.jsonExample}`);
|
|
745796
745809
|
}
|
|
745797
745810
|
}
|
|
745798
745811
|
return url;
|