@fern-api/fern-api-dev 3.52.0-61-g25c914de7fa → 3.52.0-63-g2019600bc72

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 +51 -34
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1402470,16 +1402470,16 @@ function isUnicodeSupported() {
1402470
1402470
 
1402471
1402471
  // ../../../node_modules/.pnpm/log-symbols@5.1.0/node_modules/log-symbols/index.js
1402472
1402472
  var main = {
1402473
- info: source_default2.blue("\u2139"),
1402474
- success: source_default2.green("\u2714"),
1402475
- warning: source_default2.yellow("\u26A0"),
1402476
- error: source_default2.red("\u2716")
1402473
+ info: source_default.blue("\u2139"),
1402474
+ success: source_default.green("\u2714"),
1402475
+ warning: source_default.yellow("\u26A0"),
1402476
+ error: source_default.red("\u2716")
1402477
1402477
  };
1402478
1402478
  var fallback = {
1402479
- info: source_default2.blue("i"),
1402480
- success: source_default2.green("\u221A"),
1402481
- warning: source_default2.yellow("\u203C"),
1402482
- error: source_default2.red("\xD7")
1402479
+ info: source_default.blue("i"),
1402480
+ success: source_default.green("\u221A"),
1402481
+ warning: source_default.yellow("\u203C"),
1402482
+ error: source_default.red("\xD7")
1402483
1402483
  };
1402484
1402484
  var logSymbols = isUnicodeSupported() ? main : fallback;
1402485
1402485
  var log_symbols_default = logSymbols;
@@ -1488097,7 +1488097,7 @@ var AbstractDynamicSnippetsGenerator = class {
1488097
1488097
  this.context = context2;
1488098
1488098
  }
1488099
1488099
  async generate(request6, options2 = {}) {
1488100
- const endpoints = this.context.resolveEndpointLocationOrThrow(request6.endpoint);
1488100
+ const endpoints = this.resolveEndpoints({ request: request6, options: options2 });
1488101
1488101
  if (endpoints.length === 0) {
1488102
1488102
  throw new Error(`No endpoints found that match "${request6.endpoint.method} ${request6.endpoint.path}"`);
1488103
1488103
  }
@@ -1488123,7 +1488123,7 @@ var AbstractDynamicSnippetsGenerator = class {
1488123
1488123
  return result.getResponseOrThrow({ endpoint: request6.endpoint });
1488124
1488124
  }
1488125
1488125
  async generateSnippetAst(request6, options2 = {}) {
1488126
- const endpoints = this.context.resolveEndpointLocationOrThrow(request6.endpoint);
1488126
+ const endpoints = this.resolveEndpoints({ request: request6, options: options2 });
1488127
1488127
  if (endpoints.length === 0) {
1488128
1488128
  throw new Error(`No endpoints found that match "${request6.endpoint.method} ${request6.endpoint.path}"`);
1488129
1488129
  }
@@ -1488144,7 +1488144,7 @@ var AbstractDynamicSnippetsGenerator = class {
1488144
1488144
  throw new Error(`Failed to generate snippet AST for endpoint: ${request6.endpoint.method} ${request6.endpoint.path}`);
1488145
1488145
  }
1488146
1488146
  generateSync(request6, options2 = {}) {
1488147
- const endpoints = this.context.resolveEndpointLocationOrThrow(request6.endpoint);
1488147
+ const endpoints = this.resolveEndpoints({ request: request6, options: options2 });
1488148
1488148
  if (endpoints.length === 0) {
1488149
1488149
  throw new Error(`No endpoints found that match "${request6.endpoint.method} ${request6.endpoint.path}"`);
1488150
1488150
  }
@@ -1488169,6 +1488169,21 @@ var AbstractDynamicSnippetsGenerator = class {
1488169
1488169
  }
1488170
1488170
  return result.getResponseOrThrow({ endpoint: request6.endpoint });
1488171
1488171
  }
1488172
+ /**
1488173
+ * Resolves endpoints based on the request and options.
1488174
+ * If an endpointId is specified in options, returns only that specific endpoint.
1488175
+ * Otherwise, resolves all endpoints matching the endpoint location (method + path).
1488176
+ */
1488177
+ resolveEndpoints({ request: request6, options: options2 }) {
1488178
+ if (options2.endpointId != null) {
1488179
+ const endpoint3 = this.context.resolveEndpointById(options2.endpointId);
1488180
+ if (endpoint3 == null) {
1488181
+ throw new Error(`No endpoint found with ID "${options2.endpointId}"`);
1488182
+ }
1488183
+ return [endpoint3];
1488184
+ }
1488185
+ return this.context.resolveEndpointLocationOrThrow(request6.endpoint);
1488186
+ }
1488172
1488187
  };
1488173
1488188
 
1488174
1488189
  // ../../../generators/browser-compatible-base/lib/dynamic-snippets/ErrorReporter.js
@@ -1505762,7 +1505777,6 @@ var EndpointSnippetGenerator4 = class {
1505762
1505777
 
1505763
1505778
  // ../../../generators/java-v2/dynamic-snippets/lib/DynamicSnippetsGenerator.js
1505764
1505779
  var DynamicSnippetsGenerator3 = class extends AbstractDynamicSnippetsGenerator {
1505765
- formatter;
1505766
1505780
  constructor({ ir: ir14, config: config3, options: options2 = {} }) {
1505767
1505781
  super(new DynamicSnippetsGeneratorContext3({ ir: ir14, config: config3, options: options2 }));
1505768
1505782
  }
@@ -1511925,22 +1511939,26 @@ var DynamicSnippetsGenerator5 = class extends AbstractDynamicSnippetsGenerator {
1511925
1511939
  constructor({ ir: ir14, config: config3 }) {
1511926
1511940
  super(new DynamicSnippetsGeneratorContext5({ ir: ir14, config: config3 }));
1511927
1511941
  }
1511928
- async generate(request6) {
1511929
- return super.generate(request6);
1511942
+ async generate(request6, options2 = {}) {
1511943
+ return super.generate(request6, options2);
1511930
1511944
  }
1511931
- generateSync(request6) {
1511932
- return super.generateSync(request6);
1511945
+ generateSync(request6, options2 = {}) {
1511946
+ return super.generateSync(request6, options2);
1511933
1511947
  }
1511934
- async generateSnippetAst(request6) {
1511935
- return super.generateSnippetAst(request6);
1511948
+ async generateSnippetAst(request6, options2 = {}) {
1511949
+ return super.generateSnippetAst(request6, options2);
1511936
1511950
  }
1511937
1511951
  /**
1511938
1511952
  * Generates just the method call AST without the client instantiation.
1511939
1511953
  * This is useful for wire tests where the client is created separately
1511940
1511954
  * with test-specific configuration.
1511955
+ *
1511956
+ * @param request - The snippet request
1511957
+ * @param options - Optional options, including endpointId to resolve a specific endpoint
1511958
+ * when multiple endpoints share the same HTTP method and path
1511941
1511959
  */
1511942
- generateMethodCallSnippetAst(request6) {
1511943
- const endpoints = this.context.resolveEndpointLocationOrThrow(request6.endpoint);
1511960
+ generateMethodCallSnippetAst({ request: request6, options: options2 = {} }) {
1511961
+ const endpoints = this.resolveEndpointsForMethodCall({ request: request6, options: options2 });
1511944
1511962
  if (endpoints.length === 0) {
1511945
1511963
  throw new Error(`No endpoints found that match "${request6.endpoint.method} ${request6.endpoint.path}"`);
1511946
1511964
  }
@@ -1511959,16 +1511977,15 @@ var DynamicSnippetsGenerator5 = class extends AbstractDynamicSnippetsGenerator {
1511959
1511977
  }
1511960
1511978
  throw new Error(`Failed to generate method call snippet AST for endpoint: ${request6.endpoint.method} ${request6.endpoint.path}`);
1511961
1511979
  }
1511962
- /**
1511963
- * Generates just the method call AST without the client instantiation, using the endpoint ID directly.
1511964
- * This is useful for wire tests where the client is created separately with test-specific configuration,
1511965
- * and when there are multiple endpoints with the same HTTP method and path pattern across different namespaces.
1511966
- */
1511967
- generateMethodCallSnippetAstById({ endpointId, request: request6 }) {
1511968
- const endpoint3 = this.context.resolveEndpointByIdOrThrow(endpointId);
1511969
- const context2 = this.context.clone();
1511970
- const snippetGenerator = this.createSnippetGenerator(context2);
1511971
- return snippetGenerator.generateMethodCallSnippetAst({ endpoint: endpoint3, request: request6 });
1511980
+ resolveEndpointsForMethodCall({ request: request6, options: options2 }) {
1511981
+ if (options2.endpointId != null) {
1511982
+ const endpoint3 = this.context.resolveEndpointById(options2.endpointId);
1511983
+ if (endpoint3 == null) {
1511984
+ throw new Error(`No endpoint found with ID "${options2.endpointId}"`);
1511985
+ }
1511986
+ return [endpoint3];
1511987
+ }
1511988
+ return this.context.resolveEndpointLocationOrThrow(request6.endpoint);
1511972
1511989
  }
1511973
1511990
  createSnippetGenerator(context2) {
1511974
1511991
  return new EndpointSnippetGenerator6({ context: context2 });
@@ -1650952,7 +1650969,7 @@ var AccessTokenPosthogManager = class {
1650952
1650969
  properties: {
1650953
1650970
  ...event,
1650954
1650971
  ...event.properties,
1650955
- version: "3.52.0-61-g25c914de7fa",
1650972
+ version: "3.52.0-63-g2019600bc72",
1650956
1650973
  usingAccessToken: true
1650957
1650974
  }
1650958
1650975
  });
@@ -1651002,7 +1651019,7 @@ var UserPosthogManager = class {
1651002
1651019
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1651003
1651020
  event: "CLI",
1651004
1651021
  properties: {
1651005
- version: "3.52.0-61-g25c914de7fa",
1651022
+ version: "3.52.0-63-g2019600bc72",
1651006
1651023
  ...event,
1651007
1651024
  ...event.properties,
1651008
1651025
  usingAccessToken: false,
@@ -1684144,7 +1684161,7 @@ var CliContext = class {
1684144
1684161
  if (false) {
1684145
1684162
  this.logger.error("CLI_VERSION is not defined");
1684146
1684163
  }
1684147
- return "3.52.0-61-g25c914de7fa";
1684164
+ return "3.52.0-63-g2019600bc72";
1684148
1684165
  }
1684149
1684166
  getCliName() {
1684150
1684167
  if (false) {
@@ -1687257,7 +1687274,7 @@ var import_path54 = __toESM(require("path"), 1);
1687257
1687274
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1687258
1687275
  var LOGS_FOLDER_NAME = "logs";
1687259
1687276
  function getCliSource() {
1687260
- const version7 = "3.52.0-61-g25c914de7fa";
1687277
+ const version7 = "3.52.0-63-g2019600bc72";
1687261
1687278
  return `cli@${version7}`;
1687262
1687279
  }
1687263
1687280
  var DebugLogger = class {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.52.0-61-g25c914de7fa",
2
+ "version": "3.52.0-63-g2019600bc72",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",