fern-api 0.19.0-rc6 → 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 +6 -84
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -799138,7 +799138,7 @@ var AccessTokenPosthogManager = class {
799138
799138
  properties: {
799139
799139
  ...event,
799140
799140
  ...event.properties,
799141
- version: "0.19.0-rc6",
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-rc6",
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-rc6" == 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-rc6";
825874
+ return "0.19.0-rc7";
825953
825875
  }
825954
825876
  getCliName() {
825955
825877
  if ("fern" == null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.19.0-rc6",
3
+ "version": "0.19.0-rc7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",