@fern-api/fern-api-dev 4.96.0-31-gee880cfe0dd → 4.96.0-41-gbb1a410b3fb

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/cli.cjs +54 -30
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -618191,7 +618191,7 @@ var AccessTokenPosthogManager = class {
618191
618191
  properties: {
618192
618192
  ...event,
618193
618193
  ...event.properties,
618194
- version: "4.96.0-31-gee880cfe0dd",
618194
+ version: "4.96.0-41-gbb1a410b3fb",
618195
618195
  usingAccessToken: true
618196
618196
  }
618197
618197
  });
@@ -618245,7 +618245,7 @@ var UserPosthogManager = class {
618245
618245
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
618246
618246
  event: "CLI",
618247
618247
  properties: {
618248
- version: "4.96.0-31-gee880cfe0dd",
618248
+ version: "4.96.0-41-gbb1a410b3fb",
618249
618249
  ...event,
618250
618250
  ...event.properties,
618251
618251
  usingAccessToken: false,
@@ -829369,7 +829369,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
829369
829369
  var LOGS_FOLDER_NAME = "logs";
829370
829370
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
829371
829371
  function getCliSource() {
829372
- const version7 = "4.96.0-31-gee880cfe0dd";
829372
+ const version7 = "4.96.0-41-gbb1a410b3fb";
829373
829373
  return `cli@${version7}`;
829374
829374
  }
829375
829375
  var DebugLogger = class {
@@ -841332,7 +841332,7 @@ var LegacyDocsPublisher = class {
841332
841332
  previewId,
841333
841333
  disableTemplates: void 0,
841334
841334
  skipUpload,
841335
- cliVersion: "4.96.0-31-gee880cfe0dd",
841335
+ cliVersion: "4.96.0-41-gbb1a410b3fb",
841336
841336
  loginCommand: "fern auth login"
841337
841337
  });
841338
841338
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -873735,20 +873735,7 @@ var EndpointSnippetGenerator5 = class {
873735
873735
  if (snippet2.auth != null) {
873736
873736
  authArgs.push(...this.getConstructorAuthArgs({ auth: endpoint3.auth, values: snippet2.auth }));
873737
873737
  } else {
873738
- if (endpoint3.auth.type === "inferred") {
873739
- const defaultInferredAuthValues = {
873740
- values: void 0
873741
- };
873742
- authArgs.push(...this.getConstructorInferredAuthArgs({
873743
- auth: endpoint3.auth,
873744
- values: defaultInferredAuthValues
873745
- }));
873746
- } else {
873747
- this.context.errors.add({
873748
- severity: Severity.Warning,
873749
- message: `Auth with ${endpoint3.auth.type} configuration is required for this endpoint`
873750
- });
873751
- }
873738
+ authArgs.push(...this.getDefaultAuthArgs({ auth: endpoint3.auth }));
873752
873739
  }
873753
873740
  }
873754
873741
  const hasMultiUrlEnvironments = this.context.ir.environments?.environments.type === "multipleBaseUrls";
@@ -873808,6 +873795,40 @@ var EndpointSnippetGenerator5 = class {
873808
873795
  assertNever(auth8);
873809
873796
  }
873810
873797
  }
873798
+ getDefaultAuthArgs({ auth: auth8 }) {
873799
+ switch (auth8.type) {
873800
+ case "bearer":
873801
+ return this.getConstructorBearerAuthArgs({
873802
+ auth: auth8,
873803
+ values: { token: "YOUR_TOKEN" }
873804
+ });
873805
+ case "oauth":
873806
+ return this.getConstructorOAuthArgs({
873807
+ auth: auth8,
873808
+ values: { clientId: "YOUR_CLIENT_ID", clientSecret: "YOUR_CLIENT_SECRET" }
873809
+ });
873810
+ case "basic":
873811
+ return this.getConstructorBasicAuthArgs({
873812
+ auth: auth8,
873813
+ values: {
873814
+ username: "YOUR_USERNAME",
873815
+ password: "YOUR_PASSWORD"
873816
+ }
873817
+ });
873818
+ case "header":
873819
+ return this.getConstructorHeaderAuthArgs({
873820
+ auth: auth8,
873821
+ values: { value: "YOUR_AUTH_TOKEN" }
873822
+ });
873823
+ case "inferred":
873824
+ return this.getConstructorInferredAuthArgs({
873825
+ auth: auth8,
873826
+ values: { values: void 0 }
873827
+ });
873828
+ default:
873829
+ assertNever(auth8);
873830
+ }
873831
+ }
873811
873832
  addError(message) {
873812
873833
  this.context.errors.add({ severity: Severity.Critical, message });
873813
873834
  }
@@ -873815,17 +873836,14 @@ var EndpointSnippetGenerator5 = class {
873815
873836
  this.context.errors.add({ severity: Severity.Warning, message });
873816
873837
  }
873817
873838
  getConstructorBasicAuthArgs({ auth: auth8, values: values2 }) {
873818
- const authRecord = auth8;
873819
- const usernameOmitted = !!authRecord.usernameOmit;
873820
- const passwordOmitted = !!authRecord.passwordOmit;
873821
873839
  const args = [];
873822
- if (!usernameOmitted) {
873840
+ if (!auth8.usernameOmit) {
873823
873841
  args.push({
873824
873842
  name: this.context.getPropertyName(auth8.username),
873825
873843
  assignment: php_exports.TypeLiteral.string(values2.username)
873826
873844
  });
873827
873845
  }
873828
- if (!passwordOmitted) {
873846
+ if (!auth8.passwordOmit) {
873829
873847
  args.push({
873830
873848
  name: this.context.getPropertyName(auth8.password),
873831
873849
  assignment: php_exports.TypeLiteral.string(values2.password)
@@ -877008,16 +877026,22 @@ var EndpointSnippetGenerator6 = class {
877008
877026
  this.context.errors.add({ severity: Severity.Warning, message });
877009
877027
  }
877010
877028
  getConstructorBasicAuthArg({ auth: auth8, values: values2 }) {
877011
- return [
877012
- {
877029
+ const usernameOmitted = "usernameOmit" in auth8 && auth8.usernameOmit === true;
877030
+ const passwordOmitted = "passwordOmit" in auth8 && auth8.passwordOmit === true;
877031
+ const args = [];
877032
+ if (!usernameOmitted) {
877033
+ args.push({
877013
877034
  name: this.context.getPropertyName(auth8.username),
877014
877035
  value: python_exports.TypeInstantiation.str(values2.username)
877015
- },
877016
- {
877036
+ });
877037
+ }
877038
+ if (!passwordOmitted) {
877039
+ args.push({
877017
877040
  name: this.context.getPropertyName(auth8.password),
877018
877041
  value: python_exports.TypeInstantiation.str(values2.password)
877019
- }
877020
- ];
877042
+ });
877043
+ }
877044
+ return args;
877021
877045
  }
877022
877046
  getConstructorBearerAuthArgs({ auth: auth8, values: values2 }) {
877023
877047
  return [
@@ -915856,7 +915880,7 @@ var CliContext = class _CliContext {
915856
915880
  if (false) {
915857
915881
  this.logger.error("CLI_VERSION is not defined");
915858
915882
  }
915859
- return "4.96.0-31-gee880cfe0dd";
915883
+ return "4.96.0-41-gbb1a410b3fb";
915860
915884
  }
915861
915885
  getCliName() {
915862
915886
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.96.0-31-gee880cfe0dd",
2
+ "version": "4.96.0-41-gbb1a410b3fb",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",