fern-api 0.39.12 → 0.39.13

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.
Files changed (2) hide show
  1. package/bundle.cjs +11 -7
  2. 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.12",
1192628
+ version: "0.39.13",
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.12",
1192690
+ version: "0.39.13",
1192691
1192691
  ...event,
1192692
1192692
  ...event.properties
1192693
1192693
  }
@@ -1222814,10 +1222814,10 @@ var CliContext = class {
1222814
1222814
  return "fern-api";
1222815
1222815
  }
1222816
1222816
  getPackageVersion() {
1222817
- if ("0.39.12" == null) {
1222817
+ if ("0.39.13" == null) {
1222818
1222818
  this.logger.error("CLI_VERSION is not defined");
1222819
1222819
  }
1222820
- return "0.39.12";
1222820
+ return "0.39.13";
1222821
1222821
  }
1222822
1222822
  getCliName() {
1222823
1222823
  if ("fern" == null) {
@@ -1239704,7 +1239704,7 @@ function convertExampleEndpointCall2({ service, endpoint, example, typeResolver,
1239704
1239704
  id: example.name ?? hashJSON(example),
1239705
1239705
  name: example.name != null ? file.casingsGenerator.generateName(example.name) : void 0,
1239706
1239706
  docs: example.docs,
1239707
- url: buildUrl({ service, endpoint, example, pathParams: convertedPathParameters }),
1239707
+ url: buildUrl({ file, service, endpoint, example, pathParams: convertedPathParameters }),
1239708
1239708
  ...convertedPathParameters,
1239709
1239709
  ...convertHeaders({ service, endpoint, example, typeResolver, exampleResolver, file, workspace }),
1239710
1239710
  queryParameters: example["query-parameters"] != null ? Object.entries(example["query-parameters"]).map(([wireKey, value]) => {
@@ -1240024,8 +1240024,8 @@ function convertExampleResponseBody({ endpoint, example, typeResolver, exampleRe
1240024
1240024
  workspace
1240025
1240025
  });
1240026
1240026
  }
1240027
- function buildUrl({ service, endpoint, example, pathParams }) {
1240028
- let url = service["base-path"] + endpoint.path;
1240027
+ function buildUrl({ file, service, endpoint, example, pathParams }) {
1240028
+ let url = urlJoin10(file.rootApiFile["base-path"] ?? "", service["base-path"], endpoint.path);
1240029
1240029
  if (example["path-parameters"] != null) {
1240030
1240030
  for (const parameter of [
1240031
1240031
  ...pathParams.endpointPathParameters,
@@ -1240035,6 +1240035,10 @@ function buildUrl({ service, endpoint, example, pathParams }) {
1240035
1240035
  url = url.replaceAll(`{${parameter.name.originalName}}`, `${parameter.value.jsonExample}`);
1240036
1240036
  }
1240037
1240037
  }
1240038
+ url = url.replaceAll("//", "/");
1240039
+ if (!url.startsWith("/")) {
1240040
+ url = `/${url}`;
1240041
+ }
1240038
1240042
  return url;
1240039
1240043
  }
1240040
1240044
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.39.12",
3
+ "version": "0.39.13",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",