@fern-api/fern-api-dev 4.78.0 → 4.79.0-1-g7cc8d6587dd

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 +64 -14
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -14364,7 +14364,7 @@ var require_utils3 = __commonJS({
14364
14364
  field5.resolve = wrapFieldResolver(tracer, getConfig, field5.resolve);
14365
14365
  }
14366
14366
  if (field5.type) {
14367
- const unwrappedTypes = unwrapType(field5.type);
14367
+ const unwrappedTypes = unwrapType2(field5.type);
14368
14368
  for (const unwrappedType of unwrappedTypes) {
14369
14369
  wrapFields(unwrappedType, tracer, getConfig);
14370
14370
  }
@@ -14372,9 +14372,9 @@ var require_utils3 = __commonJS({
14372
14372
  });
14373
14373
  }
14374
14374
  exports2.wrapFields = wrapFields;
14375
- function unwrapType(type8) {
14375
+ function unwrapType2(type8) {
14376
14376
  if ("ofType" in type8) {
14377
- return unwrapType(type8.ofType);
14377
+ return unwrapType2(type8.ofType);
14378
14378
  }
14379
14379
  if (isGraphQLUnionType(type8)) {
14380
14380
  return type8.getTypes();
@@ -468855,7 +468855,7 @@ function getClientOptions(options2, getDefaultIntegrationsImpl) {
468855
468855
  const tracesSampleRate = getTracesSampleRate(options2.tracesSampleRate);
468856
468856
  const mergedOptions = {
468857
468857
  ...options2,
468858
- dsn: options2.dsn ?? "",
468858
+ dsn: options2.dsn ?? "https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496",
468859
468859
  environment: options2.environment ?? "development",
468860
468860
  sendClientReports: options2.sendClientReports ?? true,
468861
468861
  transport: options2.transport ?? makeNodeTransport,
@@ -509660,6 +509660,7 @@ var DocsSettingsConfig2 = schemas_exports6.object({
509660
509660
  hide404Page: schemas_exports6.property("hide-404-page", schemas_exports6.boolean().optional()),
509661
509661
  useJavascriptAsTypescript: schemas_exports6.property("use-javascript-as-typescript", schemas_exports6.boolean().optional()),
509662
509662
  disableExplorerProxy: schemas_exports6.property("disable-explorer-proxy", schemas_exports6.boolean().optional()),
509663
+ disableEnvironmentEditing: schemas_exports6.property("disable-environment-editing", schemas_exports6.boolean().optional()),
509663
509664
  disableAnalytics: schemas_exports6.property("disable-analytics", schemas_exports6.boolean().optional()),
509664
509665
  language: Language3.optional(),
509665
509666
  folderTitleSource: schemas_exports6.property("folder-title-source", TitleSource3.optional()),
@@ -522459,9 +522460,10 @@ function buildEndpointExample({ endpointExample, context: context3 }) {
522459
522460
  if (endpointHeaderNames.has(header)) {
522460
522461
  continue;
522461
522462
  }
522463
+ const headerType = info != null && typeof info === "object" ? info.type : typeof info === "string" ? info : void 0;
522462
522464
  namedFullExamples.push({
522463
522465
  name: header,
522464
- value: FullExample.primitive(PrimitiveExample.string(header))
522466
+ value: FullExample.primitive(buildPrimitiveExampleForType(unwrapType(headerType), header))
522465
522467
  });
522466
522468
  }
522467
522469
  example.headers = convertHeaderExamples2({
@@ -522517,6 +522519,42 @@ function convertQueryParameterExample2(namedFullExamples) {
522517
522519
  });
522518
522520
  return result;
522519
522521
  }
522522
+ function unwrapType(type8) {
522523
+ if (type8 == null) {
522524
+ return void 0;
522525
+ }
522526
+ const match3 = type8.match(/^(?:optional|nullable)<(.+)>$/);
522527
+ return match3 != null ? unwrapType(match3[1]) : type8;
522528
+ }
522529
+ function buildPrimitiveExampleForType(headerType, headerName) {
522530
+ switch (headerType) {
522531
+ case "integer":
522532
+ case "int":
522533
+ return PrimitiveExample.int(0);
522534
+ case "int64":
522535
+ case "long":
522536
+ return PrimitiveExample.int64(0);
522537
+ case "uint":
522538
+ return PrimitiveExample.uint(0);
522539
+ case "uint64":
522540
+ return PrimitiveExample.uint64(0);
522541
+ case "float":
522542
+ return PrimitiveExample.float(0);
522543
+ case "double":
522544
+ return PrimitiveExample.double(0);
522545
+ case "boolean":
522546
+ return PrimitiveExample.boolean(true);
522547
+ case "date":
522548
+ return PrimitiveExample.date("2024-01-01");
522549
+ case "date-time":
522550
+ case "datetime":
522551
+ return PrimitiveExample.datetime("2024-01-01T00:00:00Z");
522552
+ case "base64":
522553
+ return PrimitiveExample.base64("SGVsbG8=");
522554
+ default:
522555
+ return PrimitiveExample.string(headerName);
522556
+ }
522557
+ }
522520
522558
  function convertHeaderExamples2({ context: context3, namedFullExamples }) {
522521
522559
  const result = {};
522522
522560
  namedFullExamples.forEach((namedFullExample) => {
@@ -544507,6 +544545,7 @@ function convertSettingsConfig(settings) {
544507
544545
  searchText: settings.searchText ?? void 0,
544508
544546
  useJavascriptAsTypescript: settings.useJavascriptAsTypescript ?? false,
544509
544547
  disableExplorerProxy: settings.disableExplorerProxy ?? false,
544548
+ disableEnvironmentEditing: settings.disableEnvironmentEditing ?? false,
544510
544549
  disableAnalytics: settings.disableAnalytics ?? false
544511
544550
  };
544512
544551
  }
@@ -622189,7 +622228,7 @@ var AccessTokenPosthogManager = class {
622189
622228
  properties: {
622190
622229
  ...event,
622191
622230
  ...event.properties,
622192
- version: "4.78.0",
622231
+ version: "4.79.0-1-g7cc8d6587dd",
622193
622232
  usingAccessToken: true
622194
622233
  }
622195
622234
  });
@@ -622243,7 +622282,7 @@ var UserPosthogManager = class {
622243
622282
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
622244
622283
  event: "CLI",
622245
622284
  properties: {
622246
- version: "4.78.0",
622285
+ version: "4.79.0-1-g7cc8d6587dd",
622247
622286
  ...event,
622248
622287
  ...event.properties,
622249
622288
  usingAccessToken: false,
@@ -625705,7 +625744,7 @@ var TelemetryClient = class _TelemetryClient {
625705
625744
  usingAccessToken: process.env.FERN_TOKEN != null
625706
625745
  };
625707
625746
  this.posthog = apiKey != null && apiKey.length > 0 && isTelemetryEnabled ? new PostHog(apiKey) : void 0;
625708
- const sentryDsn = "";
625747
+ const sentryDsn = "https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";
625709
625748
  if (sentryDsn != null && sentryDsn.length > 0 && isTelemetryEnabled) {
625710
625749
  const sentryEnvironment = "development";
625711
625750
  if (sentryEnvironment == null || sentryEnvironment.length === 0) {
@@ -839470,7 +839509,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
839470
839509
  var LOGS_FOLDER_NAME = "logs";
839471
839510
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
839472
839511
  function getCliSource() {
839473
- const version7 = "4.78.0";
839512
+ const version7 = "4.79.0-1-g7cc8d6587dd";
839474
839513
  return `cli@${version7}`;
839475
839514
  }
839476
839515
  var DebugLogger = class {
@@ -848164,6 +848203,16 @@ var definitions6 = {
848164
848203
  }
848165
848204
  ]
848166
848205
  },
848206
+ "disable-environment-editing": {
848207
+ oneOf: [
848208
+ {
848209
+ type: "boolean"
848210
+ },
848211
+ {
848212
+ type: "null"
848213
+ }
848214
+ ]
848215
+ },
848167
848216
  "disable-analytics": {
848168
848217
  oneOf: [
848169
848218
  {
@@ -850789,7 +850838,7 @@ var LegacyDocsPublisher = class {
850789
850838
  previewId,
850790
850839
  disableTemplates: void 0,
850791
850840
  skipUpload,
850792
- cliVersion: "4.78.0"
850841
+ cliVersion: "4.79.0-1-g7cc8d6587dd"
850793
850842
  });
850794
850843
  if (taskContext.getResult() === TaskResult.Failure) {
850795
850844
  return { success: false };
@@ -886450,12 +886499,13 @@ var DynamicSnippetsGeneratorContext5 = class _DynamicSnippetsGeneratorContext ex
886450
886499
  }
886451
886500
  getDiscriminatedUnionVariantClassReference({ unionDeclaration, discriminantValue }) {
886452
886501
  const unionClassName = this.getClassName(unionDeclaration.name);
886453
- const variantSuffix = discriminantValue.name.pascalCase.safeName;
886502
+ const variantName = discriminantValue.name.pascalCase.safeName;
886454
886503
  const modulePath = [
886455
886504
  ...this.getRootModulePath(),
886456
886505
  ...unionDeclaration.fernFilepath.allParts.map((part) => part.snakeCase.safeName)
886457
886506
  ];
886458
- return python_exports2.reference({ name: `${unionClassName}_${variantSuffix}`, modulePath });
886507
+ const name2 = this.customConfig.pydantic_config?.union_naming === "v1" ? `${variantName}${unionClassName}` : `${unionClassName}_${variantName}`;
886508
+ return python_exports2.reference({ name: name2, modulePath });
886459
886509
  }
886460
886510
  useTypedDictRequests() {
886461
886511
  return this.customConfig.use_typeddict_requests === true;
@@ -925266,7 +925316,7 @@ var SentryClient = class {
925266
925316
  sentry;
925267
925317
  constructor({ release: release2 }) {
925268
925318
  const isTelemetryEnabled = process.env.FERN_DISABLE_TELEMETRY !== "true";
925269
- const sentryDsn = "";
925319
+ const sentryDsn = "https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";
925270
925320
  if (isTelemetryEnabled && sentryDsn != null && sentryDsn.length > 0) {
925271
925321
  const sentryEnvironment = "development";
925272
925322
  if (sentryEnvironment == null || sentryEnvironment.length === 0) {
@@ -925861,7 +925911,7 @@ var CliContext = class _CliContext {
925861
925911
  if (false) {
925862
925912
  this.logger.error("CLI_VERSION is not defined");
925863
925913
  }
925864
- return "4.78.0";
925914
+ return "4.79.0-1-g7cc8d6587dd";
925865
925915
  }
925866
925916
  getCliName() {
925867
925917
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.78.0",
2
+ "version": "4.79.0-1-g7cc8d6587dd",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",