@fern-api/generator-cli 0.9.15 → 0.9.17

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 (3) hide show
  1. package/dist/api.js +2841 -292
  2. package/dist/cli.js +14 -5
  3. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -35152,21 +35152,23 @@ function stringifyValidationError(error) {
35152
35152
  }
35153
35153
 
35154
35154
  // src/configuration/sdk/core/schemas/builders/schema-utils/JsonError.ts
35155
- var JsonError = class _JsonError extends Error {
35155
+ var JsonError = class extends Error {
35156
35156
  constructor(errors) {
35157
35157
  super(errors.map(stringifyValidationError).join("; "));
35158
35158
  this.errors = errors;
35159
- Object.setPrototypeOf(this, _JsonError.prototype);
35159
+ Object.setPrototypeOf(this, new.target.prototype);
35160
+ this.name = this.constructor.name;
35160
35161
  }
35161
35162
  errors;
35162
35163
  };
35163
35164
 
35164
35165
  // src/configuration/sdk/core/schemas/builders/schema-utils/ParseError.ts
35165
- var ParseError = class _ParseError extends Error {
35166
+ var ParseError = class extends Error {
35166
35167
  constructor(errors) {
35167
35168
  super(errors.map(stringifyValidationError).join("; "));
35168
35169
  this.errors = errors;
35169
- Object.setPrototypeOf(this, _ParseError.prototype);
35170
+ Object.setPrototypeOf(this, new.target.prototype);
35171
+ this.name = this.constructor.name;
35170
35172
  }
35171
35173
  errors;
35172
35174
  };
@@ -40093,7 +40095,14 @@ function hasNumericStatus(err) {
40093
40095
  return typeof err === "object" && err != null && "status" in err && typeof err.status === "number";
40094
40096
  }
40095
40097
  function isNotFoundError(err) {
40096
- return hasNumericStatus(err) && err.status === 404;
40098
+ if (hasNumericStatus(err) && err.status === 404) {
40099
+ return true;
40100
+ }
40101
+ if (hasNumericStatus(err) && err.status === 422) {
40102
+ const message = extractErrorMessage(err).toLowerCase();
40103
+ return message.includes("reference does not exist");
40104
+ }
40105
+ return false;
40097
40106
  }
40098
40107
  function isNonFastForwardError(err) {
40099
40108
  if (!hasNumericStatus(err) || err.status !== 422) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fern-api/generator-cli",
3
- "version": "0.9.15",
3
+ "version": "0.9.17",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/fern-api/fern.git",