@12-apps/storage 2.6.0 → 2.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@12-apps/storage",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "type": "module",
5
5
  "description": "Image uploads that land at YOUR OWN ORIGIN, never at the bucket (12-20). Isomorphic core (format allowlist, upload ceiling, object-key grammar, rendition set, refusal taxonomy, wire schemas), host-mounted backend surface (./server: createApiStorage, the local-disk driver, the image-pipeline port, the orphan reclaim), Hono adapter (./hono), the S3-compatible driver behind its own subpath (./s3) and the bound picker + upload hook (./react). Standardized adoption contract in ADOPTING.md.",
6
6
  "exports": {
@@ -40,6 +40,9 @@
40
40
  },
41
41
  "react-dom": {
42
42
  "optional": true
43
+ },
44
+ "@12-apps/wiring": {
45
+ "optional": true
43
46
  }
44
47
  },
45
48
  "dependencies": {
@@ -50,7 +53,7 @@
50
53
  "@12-apps/eslint-config": "^1.21.1",
51
54
  "@12-apps/i18n": "^1.1.0",
52
55
  "@12-apps/typescript-config": "^1.20.1",
53
- "@12-apps/wiring": "^1.11.0",
56
+ "@12-apps/wiring": "^1.13.0",
54
57
  "@aws-sdk/client-s3": "^3.703.0",
55
58
  "@testing-library/react": "^16.1.0",
56
59
  "@types/react": "19.2.2",
@@ -57,11 +57,20 @@ function asWireRoute(route: StorageRoute): {
57
57
  method: StorageRoute['method'];
58
58
  path: string;
59
59
  kind: 'authenticated' | 'public';
60
+ wildcardParam?: string;
60
61
  handle(request: WireRequest): Promise<WireRouteAnswer>;
61
62
  } {
62
63
  return {
63
64
  method: route.method,
64
65
  path: route.path,
66
+ // Forwarded, and it has to be: the serve route's key is FOUR segments
67
+ // (`products/<scope>/<uuid>/card-320.webp`), so an adapter that registers
68
+ // only `path` answers the prefix and 404s every real object. `./hono`
69
+ // spells the Hono form from this name; the contract carries the name so any
70
+ // other adapter can spell its own. Dropping it here is what made this
71
+ // package unmountable through a consumer at all — silently, because the
72
+ // upload route worked and only reads 404'd.
73
+ ...(route.wildcardParam === undefined ? {} : { wildcardParam: route.wildcardParam }),
65
74
  // The descriptor's own `auth` flag IS the contract's route kind: a
66
75
  // `public` object read is anonymous by design, and the host's gates read
67
76
  // this rather than a second table that could disagree with it.