@develemit/commerce-server 0.2.0 → 0.3.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/README.md +32 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +225 -72
- package/dist/index.js.map +1 -1
- package/docs/admin.md +5 -0
- package/package.json +2 -2
package/docs/admin.md
CHANGED
|
@@ -21,6 +21,11 @@ management under `/admin`. Without it, no admin routes exist (404).
|
|
|
21
21
|
| `DELETE /admin/products/:id/images/:id` | Removes the row and the stored file |
|
|
22
22
|
| `GET/PUT /admin/shipping-rates` | `PUT` replaces the full set of rates |
|
|
23
23
|
|
|
24
|
+
Stored image keys are `products/<productId>/<uuid>.<ext>` and are never
|
|
25
|
+
overwritten, so their URLs are safe to cache forever. Serve `FileStorage` URLs
|
|
26
|
+
through a CDN with `Cache-Control: public, max-age=31536000, immutable`, and
|
|
27
|
+
have it (or the storefront's image adapter) resize.
|
|
28
|
+
|
|
24
29
|
Uploads are checked by magic bytes (jpeg, png, webp, heic), not by filename or
|
|
25
30
|
the client's content type. Slugs come from the name at creation and stay
|
|
26
31
|
stable on rename. Edits never touch inventory holds.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develemit/commerce-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"file-type": "^22.2.0",
|
|
27
|
-
"@develemit/commerce-contracts": "0.
|
|
27
|
+
"@develemit/commerce-contracts": "0.3.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"drizzle-orm": "^0.45.0",
|