fern-api 0.19.0-rc5 → 0.19.0-rc7

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 +18 -92
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -103059,7 +103059,7 @@ var require_index_cjs = __commonJS({
103059
103059
  throw new Error(message);
103060
103060
  }
103061
103061
  }
103062
- function removeTrailingSlash(url) {
103062
+ function removeTrailingSlash2(url) {
103063
103063
  return url === null || url === void 0 ? void 0 : url.replace(/\/+$/, "");
103064
103064
  }
103065
103065
  function retriable(fn2, props) {
@@ -103590,7 +103590,7 @@ var require_index_cjs = __commonJS({
103590
103590
  this._events = new SimpleEventEmitter();
103591
103591
  assert3(apiKey, "You must pass your PostHog project's api key.");
103592
103592
  this.apiKey = apiKey;
103593
- this.host = removeTrailingSlash((options === null || options === void 0 ? void 0 : options.host) || "https://app.posthog.com");
103593
+ this.host = removeTrailingSlash2((options === null || options === void 0 ? void 0 : options.host) || "https://app.posthog.com");
103594
103594
  this.flushAt = (options === null || options === void 0 ? void 0 : options.flushAt) ? Math.max(options === null || options === void 0 ? void 0 : options.flushAt, 1) : 20;
103595
103595
  this.flushInterval = (_a2 = options === null || options === void 0 ? void 0 : options.flushInterval) !== null && _a2 !== void 0 ? _a2 : 1e4;
103596
103596
  this.captureMode = (options === null || options === void 0 ? void 0 : options.captureMode) || "form";
@@ -799138,7 +799138,7 @@ var AccessTokenPosthogManager = class {
799138
799138
  properties: {
799139
799139
  ...event,
799140
799140
  ...event.properties,
799141
- version: "0.19.0-rc5",
799141
+ version: "0.19.0-rc7",
799142
799142
  usingAccessToken: true
799143
799143
  }
799144
799144
  });
@@ -799200,7 +799200,7 @@ var UserPosthogManager = class {
799200
799200
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
799201
799201
  event: "CLI",
799202
799202
  properties: {
799203
- version: "0.19.0-rc5",
799203
+ version: "0.19.0-rc7",
799204
799204
  ...event,
799205
799205
  ...event.properties
799206
799206
  }
@@ -818754,7 +818754,6 @@ async function loadDependency({ dependencyName, dependenciesConfiguration, conte
818754
818754
  case "version":
818755
818755
  definition2 = await validateVersionedDependencyAndGetDefinition({
818756
818756
  context: contextForDependency,
818757
- rootApiFile,
818758
818757
  dependency,
818759
818758
  cliVersion
818760
818759
  });
@@ -818762,7 +818761,6 @@ async function loadDependency({ dependencyName, dependenciesConfiguration, conte
818762
818761
  case "local":
818763
818762
  definition2 = await validateLocalDependencyAndGetDefinition({
818764
818763
  context: contextForDependency,
818765
- rootApiFile,
818766
818764
  dependency,
818767
818765
  cliVersion
818768
818766
  });
@@ -818778,7 +818776,7 @@ async function loadDependency({ dependencyName, dependenciesConfiguration, conte
818778
818776
  return { didSucceed: false, failure };
818779
818777
  }
818780
818778
  }
818781
- async function validateLocalDependencyAndGetDefinition({ dependency, context, rootApiFile, cliVersion }) {
818779
+ async function validateLocalDependencyAndGetDefinition({ dependency, context, cliVersion }) {
818782
818780
  context.logger.info("Parsing...");
818783
818781
  const loadDependencyWorkspaceResult = await loadAPIWorkspace({
818784
818782
  absolutePathToWorkspace: dependency.absoluteFilepath,
@@ -818791,14 +818789,9 @@ async function validateLocalDependencyAndGetDefinition({ dependency, context, ro
818791
818789
  return void 0;
818792
818790
  }
818793
818791
  const workspaceOfDependency = loadDependencyWorkspaceResult.workspace.type === "fern" ? loadDependencyWorkspaceResult.workspace : await convertOpenApiWorkspaceToFernWorkspace(loadDependencyWorkspaceResult.workspace, context);
818794
- const { equal, differences } = await getAreRootApiFilesEquivalent(rootApiFile, workspaceOfDependency);
818795
- if (!equal) {
818796
- context.failWithoutThrowing(`Failed to incorporate dependency because ${ROOT_API_FILENAME} is meaningfully different for the following keys: [${differences.join(", ")}]`);
818797
- return void 0;
818798
- }
818799
818792
  return workspaceOfDependency.definition;
818800
818793
  }
818801
- async function validateVersionedDependencyAndGetDefinition({ dependency, context, rootApiFile, cliVersion }) {
818794
+ async function validateVersionedDependencyAndGetDefinition({ dependency, context, cliVersion }) {
818802
818795
  context.logger.info("Downloading manifest...");
818803
818796
  const response = await FIDDLE.definitionRegistry.get(import_fiddle_sdk3.FernFiddle.OrganizationId(dependency.organization), import_fiddle_sdk3.FernFiddle.ApiId(dependency.apiName), dependency.version);
818804
818797
  if (!response.ok) {
@@ -818861,73 +818854,8 @@ async function validateVersionedDependencyAndGetDefinition({ dependency, context
818861
818854
  context.failWithoutThrowing("Dependency must be a fern workspace.");
818862
818855
  return void 0;
818863
818856
  }
818864
- const hasEndpoints = Object.values(workspaceOfDependency.definition.namedDefinitionFiles).filter((file) => {
818865
- var _a2;
818866
- return Object.keys(((_a2 = file.contents.service) == null ? void 0 : _a2.endpoints) ?? {}).length > 0;
818867
- }).length > 0 || Object.values(workspaceOfDependency.definition.packageMarkers).filter((file) => {
818868
- var _a2;
818869
- return Object.keys(((_a2 = file.contents.service) == null ? void 0 : _a2.endpoints) ?? {}).length > 0;
818870
- }).length > 0;
818871
- if (hasEndpoints) {
818872
- const { equal, differences } = await getAreRootApiFilesEquivalent(rootApiFile, workspaceOfDependency);
818873
- if (!equal) {
818874
- context.failWithoutThrowing(`Failed to incorporate dependency because ${ROOT_API_FILENAME} is meaningfully different for the following keys: [${differences.join(", ")}]`);
818875
- return void 0;
818876
- }
818877
- }
818878
818857
  return workspaceOfDependency.definition;
818879
818858
  }
818880
- async function getAreRootApiFilesEquivalent(rootApiFile, workspaceOfDependency) {
818881
- let areRootApiFilesEquivalent = true;
818882
- const differences = [];
818883
- await visitObject(rootApiFile, {
818884
- name: noop,
818885
- imports: noop,
818886
- "display-name": noop,
818887
- auth: (auth) => {
818888
- const isAuthEquals = isEqual_default(auth, workspaceOfDependency.definition.rootApiFile.contents.auth);
818889
- if (!isAuthEquals) {
818890
- differences.push("auth");
818891
- }
818892
- areRootApiFilesEquivalent && (areRootApiFilesEquivalent = isAuthEquals);
818893
- },
818894
- "auth-schemes": (auth) => {
818895
- const authSchemeEquals = isEqual_default(auth, removeUndefined(workspaceOfDependency.definition.rootApiFile.contents["auth-schemes"]));
818896
- if (!authSchemeEquals) {
818897
- differences.push("auth-schemes");
818898
- }
818899
- areRootApiFilesEquivalent && (areRootApiFilesEquivalent = authSchemeEquals);
818900
- },
818901
- docs: noop,
818902
- headers: noop,
818903
- "idempotency-headers": noop,
818904
- "default-environment": noop,
818905
- environments: noop,
818906
- "error-discrimination": (errorDiscrimination) => {
818907
- const errorDiscriminationIsEqual = isEqual_default(errorDiscrimination, removeUndefined(workspaceOfDependency.definition.rootApiFile.contents["error-discrimination"]));
818908
- if (!errorDiscriminationIsEqual) {
818909
- differences.push("error-discrimination");
818910
- }
818911
- areRootApiFilesEquivalent && (areRootApiFilesEquivalent = errorDiscriminationIsEqual);
818912
- },
818913
- audiences: noop,
818914
- errors: noop,
818915
- "base-path": (basePath) => {
818916
- const basePathsAreEqual = basePath === workspaceOfDependency.definition.rootApiFile.contents["base-path"];
818917
- if (!basePathsAreEqual) {
818918
- differences.push("base-path");
818919
- }
818920
- areRootApiFilesEquivalent && (areRootApiFilesEquivalent = basePathsAreEqual);
818921
- },
818922
- "path-parameters": noop,
818923
- variables: noop,
818924
- pagination: noop
818925
- });
818926
- return {
818927
- equal: areRootApiFilesEquivalent,
818928
- differences
818929
- };
818930
- }
818931
818859
  async function downloadDependency({ s3PreSignedReadUrl, absolutePathToLocalOutput }) {
818932
818860
  const request = await import_axios3.default.get(s3PreSignedReadUrl, {
818933
818861
  responseType: "stream"
@@ -818947,12 +818875,6 @@ function stringifyDependency(dependency) {
818947
818875
  assertNever(dependency);
818948
818876
  }
818949
818877
  }
818950
- function removeUndefined(val) {
818951
- if (val === void 0) {
818952
- return void 0;
818953
- }
818954
- return JSON.parse(JSON.stringify(val));
818955
- }
818956
818878
 
818957
818879
  // pnp:/home/circleci/project/packages/cli/workspace-loader/lib/processPackageMarkers.js
818958
818880
  async function processPackageMarkers({ dependenciesConfiguration, structuralValidationResult, context, cliVersion }) {
@@ -825946,10 +825868,10 @@ var CliContext = class {
825946
825868
  return "fern-api";
825947
825869
  }
825948
825870
  getPackageVersion() {
825949
- if ("0.19.0-rc5" == null) {
825871
+ if ("0.19.0-rc7" == null) {
825950
825872
  this.logger.error("CLI_VERSION is not defined");
825951
825873
  }
825952
- return "0.19.0-rc5";
825874
+ return "0.19.0-rc7";
825953
825875
  }
825954
825876
  getCliName() {
825955
825877
  if ("fern" == null) {
@@ -827267,7 +827189,8 @@ var RESERVED_KEYWORDS = {
827267
827189
  "float",
827268
827190
  "int",
827269
827191
  "complex",
827270
- "self"
827192
+ "self",
827193
+ "all"
827271
827194
  ]),
827272
827195
  [GenerationLanguage.GO]: /* @__PURE__ */ new Set([
827273
827196
  "break",
@@ -830313,7 +830236,7 @@ function convertSingleBaseUrlEnvironments({ environments, casingsGenerator }) {
830313
830236
  docs: typeof singleBaseUrlEnvironment === "string" ? void 0 : singleBaseUrlEnvironment.docs,
830314
830237
  id: environmentName,
830315
830238
  name: casingsGenerator.generateName(environmentName),
830316
- url: typeof singleBaseUrlEnvironment === "string" ? singleBaseUrlEnvironment : singleBaseUrlEnvironment.url
830239
+ url: removeTrailingSlash(typeof singleBaseUrlEnvironment === "string" ? singleBaseUrlEnvironment : singleBaseUrlEnvironment.url)
830317
830240
  }),
830318
830241
  multipleBaseUrls: () => {
830319
830242
  throw new Error(`Environment ${environmentName} has multiple base URLs`);
@@ -830332,7 +830255,7 @@ function convertMultipleBaseUrlEnvironments({ baseUrls, environments, casingsGen
830332
830255
  docs: multipleBaseUrlsEnvironment.docs,
830333
830256
  id: environmentName,
830334
830257
  name: casingsGenerator.generateName(environmentName),
830335
- urls: multipleBaseUrlsEnvironment.urls
830258
+ urls: mapValues_default(multipleBaseUrlsEnvironment.urls, (url) => removeTrailingSlash(url))
830336
830259
  }),
830337
830260
  singleBaseUrl: () => {
830338
830261
  throw new Error(`Environment ${environmentName} does not have multiple base URLs`);
@@ -830340,6 +830263,9 @@ function convertMultipleBaseUrlEnvironments({ baseUrls, environments, casingsGen
830340
830263
  }))
830341
830264
  };
830342
830265
  }
830266
+ function removeTrailingSlash(url) {
830267
+ return url.endsWith("/") ? url.slice(0, -1) : url;
830268
+ }
830343
830269
 
830344
830270
  // pnp:/home/circleci/project/packages/cli/generation/ir-generator/lib/converters/convertErrorDeclaration.js
830345
830271
  function convertErrorDeclaration({ errorName, errorDeclaration, file }) {
@@ -839379,9 +839305,9 @@ var V35_TO_V34_MIGRATION = {
839379
839305
  [GeneratorName.STOPLIGHT]: GeneratorWasNeverUpdatedToConsumeNewIR,
839380
839306
  [GeneratorName.POSTMAN]: GeneratorWasNeverUpdatedToConsumeNewIR,
839381
839307
  [GeneratorName.PYTHON_SDK]: "0.11.6",
839382
- [GeneratorName.GO_FIBER]: GeneratorWasNeverUpdatedToConsumeNewIR,
839383
- [GeneratorName.GO_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR,
839384
- [GeneratorName.GO_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR,
839308
+ [GeneratorName.GO_FIBER]: "0.18.0",
839309
+ [GeneratorName.GO_MODEL]: "0.18.0",
839310
+ [GeneratorName.GO_SDK]: "0.18.0",
839385
839311
  [GeneratorName.RUBY_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR,
839386
839312
  [GeneratorName.RUBY_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR,
839387
839313
  [GeneratorName.CSHARP_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.19.0-rc5",
3
+ "version": "0.19.0-rc7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",