fern-api 0.39.11 → 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 +100 -72
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -81211,9 +81211,9 @@ var require_symlink = __commonJS({
81211
81211
  if (areIdentical(srcStat, dstStat))
81212
81212
  return;
81213
81213
  }
81214
- const relative3 = await symlinkPaths(srcpath, dstpath);
81215
- srcpath = relative3.toDst;
81216
- const toType = await symlinkType(relative3.toCwd, type2);
81214
+ const relative4 = await symlinkPaths(srcpath, dstpath);
81215
+ srcpath = relative4.toDst;
81216
+ const toType = await symlinkType(relative4.toCwd, type2);
81217
81217
  const dir = path45.dirname(dstpath);
81218
81218
  if (!await pathExists2(dir)) {
81219
81219
  await mkdirs(dir);
@@ -81232,9 +81232,9 @@ var require_symlink = __commonJS({
81232
81232
  if (areIdentical(srcStat, dstStat))
81233
81233
  return;
81234
81234
  }
81235
- const relative3 = symlinkPathsSync(srcpath, dstpath);
81236
- srcpath = relative3.toDst;
81237
- type2 = symlinkTypeSync(relative3.toCwd, type2);
81235
+ const relative4 = symlinkPathsSync(srcpath, dstpath);
81236
+ srcpath = relative4.toDst;
81237
+ type2 = symlinkTypeSync(relative4.toCwd, type2);
81238
81238
  const dir = path45.dirname(dstpath);
81239
81239
  const exists = fs8.existsSync(dir);
81240
81240
  if (exists)
@@ -86020,8 +86020,8 @@ var require_follow_redirects = __commonJS({
86020
86020
  }
86021
86021
  return parsed;
86022
86022
  }
86023
- function resolveUrl(relative3, base2) {
86024
- return useNativeURL ? new URL2(relative3, base2) : parseUrl(url.resolve(base2, relative3));
86023
+ function resolveUrl(relative4, base2) {
86024
+ return useNativeURL ? new URL2(relative4, base2) : parseUrl(url.resolve(base2, relative4));
86025
86025
  }
86026
86026
  function validateUrl(input) {
86027
86027
  if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
@@ -368671,51 +368671,51 @@ var require_uri_all = __commonJS({
368671
368671
  }
368672
368672
  return uriTokens.join("");
368673
368673
  }
368674
- function resolveComponents(base3, relative3) {
368674
+ function resolveComponents(base3, relative4) {
368675
368675
  var options2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
368676
368676
  var skipNormalization = arguments[3];
368677
368677
  var target = {};
368678
368678
  if (!skipNormalization) {
368679
368679
  base3 = parse10(serialize5(base3, options2), options2);
368680
- relative3 = parse10(serialize5(relative3, options2), options2);
368680
+ relative4 = parse10(serialize5(relative4, options2), options2);
368681
368681
  }
368682
368682
  options2 = options2 || {};
368683
- if (!options2.tolerant && relative3.scheme) {
368684
- target.scheme = relative3.scheme;
368685
- target.userinfo = relative3.userinfo;
368686
- target.host = relative3.host;
368687
- target.port = relative3.port;
368688
- target.path = removeDotSegments(relative3.path || "");
368689
- target.query = relative3.query;
368683
+ if (!options2.tolerant && relative4.scheme) {
368684
+ target.scheme = relative4.scheme;
368685
+ target.userinfo = relative4.userinfo;
368686
+ target.host = relative4.host;
368687
+ target.port = relative4.port;
368688
+ target.path = removeDotSegments(relative4.path || "");
368689
+ target.query = relative4.query;
368690
368690
  } else {
368691
- if (relative3.userinfo !== void 0 || relative3.host !== void 0 || relative3.port !== void 0) {
368692
- target.userinfo = relative3.userinfo;
368693
- target.host = relative3.host;
368694
- target.port = relative3.port;
368695
- target.path = removeDotSegments(relative3.path || "");
368696
- target.query = relative3.query;
368691
+ if (relative4.userinfo !== void 0 || relative4.host !== void 0 || relative4.port !== void 0) {
368692
+ target.userinfo = relative4.userinfo;
368693
+ target.host = relative4.host;
368694
+ target.port = relative4.port;
368695
+ target.path = removeDotSegments(relative4.path || "");
368696
+ target.query = relative4.query;
368697
368697
  } else {
368698
- if (!relative3.path) {
368698
+ if (!relative4.path) {
368699
368699
  target.path = base3.path;
368700
- if (relative3.query !== void 0) {
368701
- target.query = relative3.query;
368700
+ if (relative4.query !== void 0) {
368701
+ target.query = relative4.query;
368702
368702
  } else {
368703
368703
  target.query = base3.query;
368704
368704
  }
368705
368705
  } else {
368706
- if (relative3.path.charAt(0) === "/") {
368707
- target.path = removeDotSegments(relative3.path);
368706
+ if (relative4.path.charAt(0) === "/") {
368707
+ target.path = removeDotSegments(relative4.path);
368708
368708
  } else {
368709
368709
  if ((base3.userinfo !== void 0 || base3.host !== void 0 || base3.port !== void 0) && !base3.path) {
368710
- target.path = "/" + relative3.path;
368710
+ target.path = "/" + relative4.path;
368711
368711
  } else if (!base3.path) {
368712
- target.path = relative3.path;
368712
+ target.path = relative4.path;
368713
368713
  } else {
368714
- target.path = base3.path.slice(0, base3.path.lastIndexOf("/") + 1) + relative3.path;
368714
+ target.path = base3.path.slice(0, base3.path.lastIndexOf("/") + 1) + relative4.path;
368715
368715
  }
368716
368716
  target.path = removeDotSegments(target.path);
368717
368717
  }
368718
- target.query = relative3.query;
368718
+ target.query = relative4.query;
368719
368719
  }
368720
368720
  target.userinfo = base3.userinfo;
368721
368721
  target.host = base3.host;
@@ -368723,7 +368723,7 @@ var require_uri_all = __commonJS({
368723
368723
  }
368724
368724
  target.scheme = base3.scheme;
368725
368725
  }
368726
- target.fragment = relative3.fragment;
368726
+ target.fragment = relative4.fragment;
368727
368727
  return target;
368728
368728
  }
368729
368729
  function resolve6(baseURI, relativeURI, options2) {
@@ -430518,7 +430518,7 @@ var require_lib20 = __commonJS({
430518
430518
  // ../../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js
430519
430519
  var require_depd = __commonJS({
430520
430520
  "../../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js"(exports2, module2) {
430521
- var relative3 = require("path").relative;
430521
+ var relative4 = require("path").relative;
430522
430522
  module2.exports = depd;
430523
430523
  var basePath = process.cwd();
430524
430524
  function containsNamespace(str3, namespace) {
@@ -430710,7 +430710,7 @@ var require_depd = __commonJS({
430710
430710
  return formatted;
430711
430711
  }
430712
430712
  function formatLocation(callSite) {
430713
- return relative3(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
430713
+ return relative4(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
430714
430714
  }
430715
430715
  function getStack() {
430716
430716
  var limit = Error.stackTraceLimit;
@@ -1192625,7 +1192625,7 @@ var AccessTokenPosthogManager = class {
1192625
1192625
  properties: {
1192626
1192626
  ...event,
1192627
1192627
  ...event.properties,
1192628
- version: "0.39.11",
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.11",
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.11" == null) {
1222817
+ if ("0.39.13" == null) {
1222818
1222818
  this.logger.error("CLI_VERSION is not defined");
1222819
1222819
  }
1222820
- return "0.39.11";
1222820
+ return "0.39.13";
1222821
1222821
  }
1222822
1222822
  getCliName() {
1222823
1222823
  if ("fern" == null) {
@@ -1231179,16 +1231179,16 @@ function collect(events, tokenTypes) {
1231179
1231179
  }
1231180
1231180
  return result;
1231181
1231181
  }
1231182
- function relativeToPoint(stops, relative3) {
1231182
+ function relativeToPoint(stops, relative4) {
1231183
1231183
  let index2 = 0;
1231184
- while (index2 < stops.length && stops[index2][0] <= relative3) {
1231184
+ while (index2 < stops.length && stops[index2][0] <= relative4) {
1231185
1231185
  index2 += 1;
1231186
1231186
  }
1231187
1231187
  if (index2 === 0) {
1231188
1231188
  return void 0;
1231189
1231189
  }
1231190
1231190
  const [stopRelative, stopAbsolute] = stops[index2 - 1];
1231191
- const rest = relative3 - stopRelative;
1231191
+ const rest = relative4 - stopRelative;
1231192
1231192
  return {
1231193
1231193
  line: stopAbsolute.line,
1231194
1231194
  column: stopAbsolute.column + rest,
@@ -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
 
@@ -1240311,7 +1240315,7 @@ async function convertTransport({ file, serviceDeclaration, sourceResolver }) {
1240311
1240315
  source: serviceDeclaration.source,
1240312
1240316
  file
1240313
1240317
  });
1240314
- if (resolvedSource.type !== "protobuf") {
1240318
+ if (resolvedSource == null || resolvedSource.type !== "protobuf") {
1240315
1240319
  return Transport.http();
1240316
1240320
  }
1240317
1240321
  const protobufService = convertProtobufService({
@@ -1241870,7 +1241874,7 @@ async function convertTypeDeclarationSource({ file, typeDeclaration, typeName, s
1241870
1241874
  source: typeDeclaration.source,
1241871
1241875
  file
1241872
1241876
  });
1241873
- if (resolvedSource.type !== "protobuf") {
1241877
+ if (resolvedSource == null || resolvedSource.type !== "protobuf") {
1241874
1241878
  return void 0;
1241875
1241879
  }
1241876
1241880
  return Source.proto(convertSourceToProtobufType({
@@ -1244146,17 +1244150,21 @@ var ProtobufParser = class {
1244146
1244150
 
1244147
1244151
  // ../generation/ir-generator/lib/resolvers/SourceResolver.js
1244148
1244152
  var SourceResolverImpl = class {
1244153
+ context;
1244149
1244154
  workspace;
1244150
1244155
  sourceCache;
1244151
- constructor(workspace) {
1244156
+ constructor(context, workspace) {
1244157
+ this.context = context;
1244152
1244158
  this.workspace = workspace;
1244153
1244159
  this.sourceCache = /* @__PURE__ */ new Map();
1244154
1244160
  }
1244155
1244161
  async resolveSourceOrThrow({ source, file }) {
1244156
1244162
  const resolvedType = await this.resolveSource({ source, file });
1244157
1244163
  if (resolvedType == null) {
1244158
- const filename = isRawProtobufSourceSchema(source) ? source.proto : source.openapi;
1244159
- throw new Error(`Cannot resolve source ${filename} from file ${file.relativeFilepath}`);
1244164
+ if (isRawProtobufSourceSchema(source)) {
1244165
+ throw new Error(`Cannot resolve source ${source.proto} from file ${file.relativeFilepath}`);
1244166
+ }
1244167
+ this.context.logger.warn(`Cannot resolve source ${source.openapi} from file ${file.relativeFilepath}`);
1244160
1244168
  }
1244161
1244169
  return resolvedType;
1244162
1244170
  }
@@ -1244448,7 +1244456,7 @@ function getAudienceForEnvironment(environmentId, rawEnvironments) {
1244448
1244456
  }
1244449
1244457
 
1244450
1244458
  // ../generation/ir-generator/lib/generateIntermediateRepresentation.js
1244451
- async function generateIntermediateRepresentation({ fdrApiDefinitionId, workspace, generationLanguage, keywords: keywords2, smartCasing, disableExamples, audiences, readme, packageName, version: version3 }) {
1244459
+ async function generateIntermediateRepresentation({ fdrApiDefinitionId, workspace, generationLanguage, keywords: keywords2, smartCasing, disableExamples, audiences, readme, packageName, version: version3, context }) {
1244452
1244460
  const casingsGenerator = constructCasingsGenerator({ generationLanguage, keywords: keywords2, smartCasing });
1244453
1244461
  const irGraph = new IrGraph(audiences);
1244454
1244462
  const rootApiFileContext = constructRootApiFileContext({
@@ -1244468,7 +1244476,7 @@ async function generateIntermediateRepresentation({ fdrApiDefinitionId, workspac
1244468
1244476
  const errorResolver = new ErrorResolverImpl(workspace);
1244469
1244477
  const exampleResolver = new ExampleResolverImpl(typeResolver);
1244470
1244478
  const variableResolver = new VariableResolverImpl();
1244471
- const sourceResolver = new SourceResolverImpl(workspace);
1244479
+ const sourceResolver = new SourceResolverImpl(context, workspace);
1244472
1244480
  const intermediateRepresentation = {
1244473
1244481
  fdrApiDefinitionId,
1244474
1244482
  apiVersion: await convertApiVersionScheme({
@@ -1246927,7 +1246935,8 @@ async function registerApi({ organization, workspace, context, token, audiences,
1246927
1246935
  disableExamples: false,
1246928
1246936
  readme: void 0,
1246929
1246937
  version: void 0,
1246930
- packageName: void 0
1246938
+ packageName: void 0,
1246939
+ context
1246931
1246940
  });
1246932
1246941
  const fdrService = createFdrService({
1246933
1246942
  token: token.value
@@ -1247294,7 +1247303,8 @@ var DocsDefinitionResolver = class {
1247294
1247303
  disableExamples: false,
1247295
1247304
  readme: void 0,
1247296
1247305
  version: void 0,
1247297
- packageName: void 0
1247306
+ packageName: void 0,
1247307
+ context: this.taskContext
1247298
1247308
  });
1247299
1247309
  const apiDefinitionId = await this.registerApi({ ir, snippetsConfig });
1247300
1247310
  const api = convertIrToApiDefinition(ir, apiDefinitionId);
@@ -1294878,7 +1294888,8 @@ async function generateIrForFernWorkspace({
1294878
1294888
  audiences,
1294879
1294889
  readme,
1294880
1294890
  version: void 0,
1294881
- packageName: void 0
1294891
+ packageName: void 0,
1294892
+ context
1294882
1294893
  });
1294883
1294894
  }
1294884
1294895
 
@@ -1305861,7 +1305872,8 @@ async function getIntermediateRepresentation2({ workspace, audiences, generatorI
1305861
1305872
  disableExamples: generatorInvocation.disableExamples,
1305862
1305873
  readme: generatorInvocation.readme,
1305863
1305874
  version: version3,
1305864
- packageName
1305875
+ packageName,
1305876
+ context
1305865
1305877
  });
1305866
1305878
  if (sourceConfig != null) {
1305867
1305879
  intermediateRepresentation.sourceConfig = sourceConfig;
@@ -1306285,6 +1306297,7 @@ var import_fiddle_sdk4 = __toESM(require_fiddle_sdk(), 1);
1306285
1306297
  var import_axios6 = __toESM(require_axios4(), 1);
1306286
1306298
  var import_form_data2 = __toESM(require_form_data(), 1);
1306287
1306299
  var import_promises48 = require("fs/promises");
1306300
+ var import_path39 = require("path");
1306288
1306301
  var import_tar2 = __toESM(require_tar(), 1);
1306289
1306302
  var import_tmp_promise10 = __toESM(require_tmp_promise(), 1);
1306290
1306303
  async function createAndStartJob({ projectConfig, workspace, organization, intermediateRepresentation, generatorInvocation, version: version3, context, shouldLogS3Url, token, whitelabel, irVersionOverride, absolutePathToPreview }) {
@@ -1306333,6 +1306346,18 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
1306333
1306346
  });
1306334
1306347
  const absolutePathToFernConfigJson = join(absolutePathToTmpFernDirectory, RelativeFilePath.of(PROJECT_CONFIG_FILENAME));
1306335
1306348
  await (0, import_promises48.writeFile)(absolutePathToFernConfigJson, JSON.stringify(projectConfig.rawConfig, void 0, 2));
1306349
+ try {
1306350
+ const sources = workspace.getSources();
1306351
+ for (const source of sources) {
1306352
+ const sourceContents = await (0, import_promises48.readFile)(source.absoluteFilePath);
1306353
+ const relativeLocation = (0, import_path39.relative)(workspace.absoluteFilepath, source.absoluteFilePath);
1306354
+ const absolutePathToSourceFile = join(absolutePathToTmpFernDirectory, RelativeFilePath.of(relativeLocation));
1306355
+ await (0, import_promises48.mkdir)(dirname(absolutePathToSourceFile), { recursive: true });
1306356
+ await (0, import_promises48.writeFile)(absolutePathToSourceFile, sourceContents);
1306357
+ }
1306358
+ } catch (error) {
1306359
+ context.logger.debug(`Failed to write source files to disk, continuing: ${error}`);
1306360
+ }
1306336
1306361
  const tarPath = join(absolutePathToTmpDir, RelativeFilePath.of("definition.tgz"));
1306337
1306362
  await import_tar2.default.create({ file: tarPath, cwd: absolutePathToTmpFernDirectory }, ["."]);
1306338
1306363
  context.logger.debug("Getting upload URL for Fern definition.");
@@ -1306537,7 +1306562,7 @@ var import_axios7 = __toESM(require_axios4(), 1);
1306537
1306562
  var import_decompress3 = __toESM(require_decompress(), 1);
1306538
1306563
  var import_fs9 = require("fs");
1306539
1306564
  var import_promises49 = require("fs/promises");
1306540
- var import_path39 = __toESM(require("path"), 1);
1306565
+ var import_path40 = __toESM(require("path"), 1);
1306541
1306566
  var import_promises50 = require("stream/promises");
1306542
1306567
  var import_tmp_promise11 = __toESM(require_tmp_promise(), 1);
1306543
1306568
  var _isFinished, _createdSnippets, _snippetsS3PreSignedReadUrl;
@@ -1306622,7 +1306647,7 @@ var RemoteTaskHandler = class {
1306622
1306647
  } : void 0;
1306623
1306648
  }
1306624
1306649
  getAbsolutePathToLocalOutput() {
1306625
- return this.absolutePathToPreview != null ? join(this.absolutePathToPreview, RelativeFilePath.of(import_path39.default.basename(this.generatorInvocation.name))) : this.generatorInvocation.absolutePathToLocalOutput;
1306650
+ return this.absolutePathToPreview != null ? join(this.absolutePathToPreview, RelativeFilePath.of(import_path40.default.basename(this.generatorInvocation.name))) : this.generatorInvocation.absolutePathToLocalOutput;
1306626
1306651
  }
1306627
1306652
  get isFinished() {
1306628
1306653
  return __privateGet(this, _isFinished);
@@ -1306653,7 +1306678,7 @@ async function downloadZipForTask({ s3PreSignedReadUrl, absolutePathToLocalOutpu
1306653
1306678
  responseType: "stream"
1306654
1306679
  });
1306655
1306680
  const tmpDir = await import_tmp_promise11.default.dir({ prefix: "fern", unsafeCleanup: true });
1306656
- const outputZipPath = import_path39.default.join(tmpDir.path, "output.zip");
1306681
+ const outputZipPath = import_path40.default.join(tmpDir.path, "output.zip");
1306657
1306682
  await (0, import_promises50.pipeline)(request.data, (0, import_fs9.createWriteStream)(outputZipPath));
1306658
1306683
  if (await doesPathExist(absolutePathToLocalOutput)) {
1306659
1306684
  await (0, import_promises49.rm)(absolutePathToLocalOutput, { recursive: true });
@@ -1306782,7 +1306807,8 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
1306782
1306807
  audiences,
1306783
1306808
  readme,
1306784
1306809
  packageName,
1306785
- version: version3 ?? await computeSemanticVersion({ fdr, packageName, generatorInvocation })
1306810
+ version: version3 ?? await computeSemanticVersion({ fdr, packageName, generatorInvocation }),
1306811
+ context: interactiveTaskContext
1306786
1306812
  });
1306787
1306813
  const sources = workspace.getSources();
1306788
1306814
  const apiDefinition = convertIrToFdrApi({ ir, snippetsConfig: {} });
@@ -1307721,7 +1307747,8 @@ async function mockServer({
1307721
1307747
  disableExamples: false,
1307722
1307748
  readme: void 0,
1307723
1307749
  version: void 0,
1307724
- packageName: void 0
1307750
+ packageName: void 0,
1307751
+ context
1307725
1307752
  });
1307726
1307753
  const mockServer2 = new MockServer({
1307727
1307754
  context,
@@ -1307737,7 +1307764,7 @@ async function mockServer({
1307737
1307764
  var import_fiddle_sdk6 = __toESM(require_fiddle_sdk(), 1);
1307738
1307765
  var import_axios9 = __toESM(require_axios4(), 1);
1307739
1307766
  var import_promises53 = require("fs/promises");
1307740
- var import_path40 = __toESM(require("path"), 1);
1307767
+ var import_path41 = __toESM(require("path"), 1);
1307741
1307768
  var import_tar3 = __toESM(require_tar(), 1);
1307742
1307769
  var import_tmp_promise13 = __toESM(require_tmp_promise(), 1);
1307743
1307770
  async function registerWorkspacesV1({
@@ -1307782,7 +1307809,7 @@ async function registerWorkspacesV1({
1307782
1307809
  return;
1307783
1307810
  }
1307784
1307811
  const tmpDir = await import_tmp_promise13.default.dir();
1307785
- const tarPath = import_path40.default.join(tmpDir.path, "definition.tgz");
1307812
+ const tarPath = import_path41.default.join(tmpDir.path, "definition.tgz");
1307786
1307813
  context.logger.debug(`Compressing definition at ${tmpDir.path}`);
1307787
1307814
  await import_tar3.default.create({ file: tarPath, cwd: resolvedWorkspace.absoluteFilepath }, ["."]);
1307788
1307815
  context.logger.info("Uploading definition...");
@@ -1307852,7 +1307879,8 @@ async function testOutput({
1307852
1307879
  disableExamples: false,
1307853
1307880
  readme: void 0,
1307854
1307881
  version: void 0,
1307855
- packageName: void 0
1307882
+ packageName: void 0,
1307883
+ context
1307856
1307884
  });
1307857
1307885
  const mockServer2 = new MockServer({
1307858
1307886
  context,
@@ -1310280,7 +1310308,7 @@ async function upgrade({
1310280
1310308
 
1310281
1310309
  // src/commands/upgrade/upgradeGenerator.ts
1310282
1310310
  var import_promises77 = require("fs/promises");
1310283
- var import_path41 = __toESM(require("path"), 1);
1310311
+ var import_path42 = __toESM(require("path"), 1);
1310284
1310312
  var semver3 = __toESM(require_semver2(), 1);
1310285
1310313
  var import_yaml11 = __toESM(require_dist3(), 1);
1310286
1310314
  async function loadAndUpdateGenerators({
@@ -1310304,7 +1310332,7 @@ async function loadAndUpdateGenerators({
1310304
1310332
  return void 0;
1310305
1310333
  }
1310306
1310334
  if (!import_yaml11.default.isMap(generatorGroups)) {
1310307
- context.failAndThrow(`Expected 'groups' to be a map in ${import_path41.default.relative(process.cwd(), filepath)}`);
1310335
+ context.failAndThrow(`Expected 'groups' to be a map in ${import_path42.default.relative(process.cwd(), filepath)}`);
1310308
1310336
  return void 0;
1310309
1310337
  }
1310310
1310338
  context.logger.debug(`Groups found: ${generatorGroups.toString()}`);
@@ -1310313,7 +1310341,7 @@ async function loadAndUpdateGenerators({
1310313
1310341
  const group = groupBlock.value;
1310314
1310342
  if (!import_yaml11.default.isMap(group)) {
1310315
1310343
  context.failAndThrow(
1310316
- `Expected group ${groupName} to be a map in ${import_path41.default.relative(process.cwd(), filepath)}`
1310344
+ `Expected group ${groupName} to be a map in ${import_path42.default.relative(process.cwd(), filepath)}`
1310317
1310345
  );
1310318
1310346
  continue;
1310319
1310347
  }
@@ -1310323,7 +1310351,7 @@ async function loadAndUpdateGenerators({
1310323
1310351
  const generators = group.get("generators");
1310324
1310352
  if (!import_yaml11.default.isSeq(generators)) {
1310325
1310353
  context.failAndThrow(
1310326
- `Expected group ${groupName} to have a 'generators' key in ${import_path41.default.relative(process.cwd(), filepath)}`
1310354
+ `Expected group ${groupName} to have a 'generators' key in ${import_path42.default.relative(process.cwd(), filepath)}`
1310327
1310355
  );
1310328
1310356
  continue;
1310329
1310357
  }
@@ -1310331,7 +1310359,7 @@ async function loadAndUpdateGenerators({
1310331
1310359
  for (const generator of generators.items) {
1310332
1310360
  if (!import_yaml11.default.isMap(generator)) {
1310333
1310361
  context.failAndThrow(
1310334
- `Expected generator in group ${groupName} to be a map in ${import_path41.default.relative(process.cwd(), filepath)}`
1310362
+ `Expected generator in group ${groupName} to be a map in ${import_path42.default.relative(process.cwd(), filepath)}`
1310335
1310363
  );
1310336
1310364
  }
1310337
1310365
  if (generatorFilter != null && generator.get("name") !== generatorFilter) {
@@ -1310426,7 +1310454,7 @@ async function validateWorkspaces({
1310426
1310454
 
1310427
1310455
  // src/commands/write-definition/writeDefinitionForWorkspaces.ts
1310428
1310456
  var import_promises78 = require("fs/promises");
1310429
- var import_path42 = __toESM(require("path"), 1);
1310457
+ var import_path43 = __toESM(require("path"), 1);
1310430
1310458
  async function writeDefinitionForWorkspaces({
1310431
1310459
  project,
1310432
1310460
  cliContext,
@@ -1310460,7 +1310488,7 @@ async function writeDefinitionForFernWorkspace({
1310460
1310488
  absolutePathToOutputDirectory
1310461
1310489
  });
1310462
1310490
  context.logger.info(
1310463
- source_default.green(`Wrote imported definition at ${import_path42.default.relative(process.cwd(), absolutePathToOutputDirectory)}`)
1310491
+ source_default.green(`Wrote imported definition at ${import_path43.default.relative(process.cwd(), absolutePathToOutputDirectory)}`)
1310464
1310492
  );
1310465
1310493
  }
1310466
1310494
  }
@@ -1310479,7 +1310507,7 @@ async function writeDefinitionForOpenAPIWorkspace2({
1310479
1310507
  absolutePathToOutputDirectory
1310480
1310508
  });
1310481
1310509
  context.logger.info(
1310482
- source_default.green(`Wrote definition to ${import_path42.default.relative(process.cwd(), absolutePathToOutputDirectory)}`)
1310510
+ source_default.green(`Wrote definition to ${import_path43.default.relative(process.cwd(), absolutePathToOutputDirectory)}`)
1310483
1310511
  );
1310484
1310512
  }
1310485
1310513
  async function writeFernDefinition2({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.39.11",
3
+ "version": "0.39.13",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",