@nextlyhq/storage-s3 0.0.2-alpha.74 → 0.0.2-alpha.75

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.
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { DeleteObjectCommand, DeleteObjectsCommand, GetObjectCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
2
2
  import { Upload } from "@aws-sdk/lib-storage";
3
3
  import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
4
- // ../nextly/dist/nextly-error-D08zf_L_.mjs
4
+ // ../nextly/dist/nextly-error-BElDQWyI.mjs
5
5
  function isDbError(err) {
6
6
  if (!err || typeof err !== "object") return false;
7
7
  const obj = err;
@@ -129,6 +129,8 @@ const NEXTLY_ERROR_STATUS = {
129
129
  NEXTLY_MIGRATION_SNAPSHOT_MISSING: 404,
130
130
  NEXTLY_MIGRATION_RESOLVE_DRIFT: 409,
131
131
  NEXTLY_MIGRATION_RESOLVE_PRECONDITION: 409,
132
+ NEXTLY_MIGRATION_HISTORY_REFUSED: 409,
133
+ NEXTLY_SCHEMA_CONVERSION_UNCONFIRMED: 409,
132
134
  NEXTLY_UI_SCHEMA_INVALID: 400,
133
135
  NEXTLY_SCHEMA_SLUG_COLLISION: 409,
134
136
  NEXTLY_SCHEMA_RELATION_TARGET_MISSING: 400,
@@ -680,10 +682,15 @@ var NextlyError = class NextlyError extends Error {
680
682
  logContext: opts.logContext
681
683
  });
682
684
  }
685
+ /**
686
+ * `message` replaces the generic sentence where the caller can name what is
687
+ * already taken without leaking anything, such as a public address and the
688
+ * page holding it.
689
+ */
683
690
  static duplicate(opts) {
684
691
  return new NextlyError({
685
692
  code: "DUPLICATE",
686
- publicMessage: "Resource already exists.",
693
+ publicMessage: opts?.message ?? "Resource already exists.",
687
694
  logContext: opts?.logContext
688
695
  });
689
696
  }
@@ -853,7 +860,7 @@ var NextlyError = class NextlyError extends Error {
853
860
  return NextlyError.isCode(err, "RATE_LIMITED");
854
861
  }
855
862
  };
856
- // ../nextly/dist/validate-external-url-BKFCMuwY.mjs
863
+ // ../nextly/dist/validate-external-url-DNl_UEVd.mjs
857
864
  /** Default response body cap: reject anything larger before buffering it all. */
858
865
  /**
859
866
  * How many bytes a bounded external read may buffer, absent a caller's own cap.