@nextlyhq/storage-uploadthing 0.0.2-alpha.65 → 0.0.2-alpha.66

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.cjs CHANGED
@@ -9,7 +9,7 @@ var __esm = (fn, res) => function __init() {
9
9
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
10
  };
11
11
 
12
- // ../nextly/dist/chunk-HJ5IQPOY.mjs
12
+ // ../nextly/dist/chunk-IAZJNA2U.mjs
13
13
  function isDbError(err) {
14
14
  if (!err || typeof err !== "object") return false;
15
15
  const obj = err;
@@ -22,8 +22,8 @@ function hasBrand(value) {
22
22
  return value[NEXTLY_ERROR_BRAND] === true;
23
23
  }
24
24
  var NEXTLY_ERROR_STATUS, CANONICAL_CODE_FOR_STATUS, LEGACY_UNPROCESSABLE_STATUS, DB_ERROR_MAPPING, NEXTLY_ERROR_BRAND, NextlyError;
25
- var init_chunk_HJ5IQPOY = __esm({
26
- "../nextly/dist/chunk-HJ5IQPOY.mjs"() {
25
+ var init_chunk_IAZJNA2U = __esm({
26
+ "../nextly/dist/chunk-IAZJNA2U.mjs"() {
27
27
  NEXTLY_ERROR_STATUS = {
28
28
  VALIDATION_ERROR: 400,
29
29
  INVALID_INPUT: 400,
@@ -121,6 +121,13 @@ var init_chunk_HJ5IQPOY = __esm({
121
121
  // Plugin platform (P4) — contributes.routes collection (D25).
122
122
  NEXTLY_ROUTE_COLLISION: 409,
123
123
  NEXTLY_ROUTE_INVALID_PATH: 400,
124
+ // A root-mounted route declared where the request pipeline never reaches the
125
+ // root pass. 400 like an invalid path and not 409: nothing else claims the
126
+ // address, the declaration simply cannot be served from there.
127
+ NEXTLY_ROUTE_UNREACHABLE_ROOT: 400,
128
+ // A `mount` outside the declared union, which only an untyped caller can
129
+ // produce. 400 for the same reason: the declaration itself is unserveable.
130
+ NEXTLY_ROUTE_INVALID_MOUNT: 400,
124
131
  // An email transport whose library is an optional peer dependency the host
125
132
  // has not installed. 503 rather than 500: the request is not malformed and
126
133
  // nothing is broken, the install simply cannot carry it out yet, and the
@@ -457,11 +464,11 @@ var init_chunk_HJ5IQPOY = __esm({
457
464
  }
458
465
  });
459
466
 
460
- // ../nextly/dist/chunk-W77AQUUQ.mjs
467
+ // ../nextly/dist/chunk-T3OVIJZM.mjs
461
468
  var StorageReadTooLargeError;
462
- var init_chunk_W77AQUUQ = __esm({
463
- "../nextly/dist/chunk-W77AQUUQ.mjs"() {
464
- init_chunk_HJ5IQPOY();
469
+ var init_chunk_T3OVIJZM = __esm({
470
+ "../nextly/dist/chunk-T3OVIJZM.mjs"() {
471
+ init_chunk_IAZJNA2U();
465
472
  StorageReadTooLargeError = class extends NextlyError {
466
473
  constructor(path, maxBytes, size) {
467
474
  super({
@@ -481,7 +488,7 @@ var init_chunk_W77AQUUQ = __esm({
481
488
  }
482
489
  });
483
490
 
484
- // ../nextly/dist/chunk-C2VHLQKK.mjs
491
+ // ../nextly/dist/chunk-YGE6AGZG.mjs
485
492
  async function validateExternalUrl(rawUrl, options = {}) {
486
493
  let parsed;
487
494
  try {
@@ -930,10 +937,10 @@ async function withDeadline(work, signal) {
930
937
  ]);
931
938
  }
932
939
  var IPV4_RE, PRIVATE_IPV4_CIDRS, CLOUD_METADATA_HOSTS, ExternalUrlError, DEFAULT_MAX_RESPONSE_BYTES, DEFAULT_TIMEOUT_MS, SafeFetchError, DEFAULT_READ_TIMEOUT_MS, DEFAULT_READ_MAX_BYTES;
933
- var init_chunk_C2VHLQKK = __esm({
934
- "../nextly/dist/chunk-C2VHLQKK.mjs"() {
935
- init_chunk_W77AQUUQ();
936
- init_chunk_HJ5IQPOY();
940
+ var init_chunk_YGE6AGZG = __esm({
941
+ "../nextly/dist/chunk-YGE6AGZG.mjs"() {
942
+ init_chunk_T3OVIJZM();
943
+ init_chunk_IAZJNA2U();
937
944
  IPV4_RE = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;
938
945
  PRIVATE_IPV4_CIDRS = [
939
946
  "0.0.0.0/8",
@@ -1002,12 +1009,12 @@ var init_chunk_C2VHLQKK = __esm({
1002
1009
  }
1003
1010
  });
1004
1011
 
1005
- // ../nextly/dist/chunk-IJCL4XOT.mjs
1012
+ // ../nextly/dist/chunk-BD2ROWEF.mjs
1006
1013
  var BaseStorageAdapter;
1007
- var init_chunk_IJCL4XOT = __esm({
1008
- "../nextly/dist/chunk-IJCL4XOT.mjs"() {
1009
- init_chunk_C2VHLQKK();
1010
- init_chunk_W77AQUUQ();
1014
+ var init_chunk_BD2ROWEF = __esm({
1015
+ "../nextly/dist/chunk-BD2ROWEF.mjs"() {
1016
+ init_chunk_YGE6AGZG();
1017
+ init_chunk_T3OVIJZM();
1011
1018
  BaseStorageAdapter = class {
1012
1019
  /**
1013
1020
  * Get adapter info including capabilities.
@@ -1092,21 +1099,21 @@ var init_chunk_7P6ASYW6 = __esm({
1092
1099
  }
1093
1100
  });
1094
1101
 
1095
- // ../nextly/dist/chunk-ANFXYTYN.mjs
1096
- init_chunk_IJCL4XOT();
1102
+ // ../nextly/dist/chunk-S2YG6ODY.mjs
1103
+ init_chunk_BD2ROWEF();
1097
1104
  module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
1098
1105
 
1099
1106
  // ../nextly/dist/storage/index.mjs
1100
- init_chunk_IJCL4XOT();
1101
- init_chunk_C2VHLQKK();
1102
- init_chunk_W77AQUUQ();
1103
- init_chunk_HJ5IQPOY();
1107
+ init_chunk_BD2ROWEF();
1108
+ init_chunk_YGE6AGZG();
1109
+ init_chunk_T3OVIJZM();
1110
+ init_chunk_IAZJNA2U();
1104
1111
  init_chunk_7P6ASYW6();
1105
1112
 
1106
1113
  // ../nextly/dist/storage/fetch-stored-bytes.mjs
1107
- init_chunk_C2VHLQKK();
1108
- init_chunk_W77AQUUQ();
1109
- init_chunk_HJ5IQPOY();
1114
+ init_chunk_YGE6AGZG();
1115
+ init_chunk_T3OVIJZM();
1116
+ init_chunk_IAZJNA2U();
1110
1117
  init_chunk_7P6ASYW6();
1111
1118
  var UploadthingStorageAdapter = class extends BaseStorageAdapter {
1112
1119
  utapi;