@dimah-s3/server 1.5.8 → 1.5.10
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/adapters/express.js +9 -9
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/fastify.js +9 -9
- package/dist/adapters/fastify.js.map +1 -1
- package/dist/adapters/node.js +9 -9
- package/dist/adapters/node.js.map +1 -1
- package/dist/adapters/types.d.ts +1 -1
- package/dist/api/context.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/router.d.ts +1 -1
- package/dist/api/routes/catalog.d.ts +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/helpers/constraints.d.ts +1 -1
- package/dist/helpers/features.d.ts +1 -1
- package/dist/helpers/finalize-confirmed.d.ts +1 -1
- package/dist/helpers/hooks.d.ts +1 -1
- package/dist/helpers/logger.d.ts +1 -1
- package/dist/helpers/object-s3.d.ts +1 -1
- package/dist/helpers/resolve-route.d.ts +2 -2
- package/dist/helpers/resolve-target.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/plugin/apply-plugins.d.ts +1 -1
- package/dist/plugin/types.d.ts +1 -1
- package/dist/plugins.js +2 -2
- package/dist/plugins.js.map +1 -1
- package/dist/put.d.ts +1 -1
- package/dist/route.d.ts +1 -1
- package/dist/types/config.d.ts +1 -1
- package/package.json +11 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StorageClass } from "@aws-sdk/client-s3";
|
|
2
|
-
import type { ObjectS3Headers } from "../types/index.
|
|
2
|
+
import type { ObjectS3Headers } from "../types/index.js";
|
|
3
3
|
/** URL-encoded `key=value&…` for the S3 `Tagging` / `x-amz-tagging` field. */
|
|
4
4
|
export declare function encodeObjectTagging(tagging: Record<string, string>): string;
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ResolvedObject } from "./resolve-target.
|
|
2
|
-
import type { OpenedRoute, ResolvedDimahS3Config, ResolvedRoute, RouteOperation, StoredObjectContext } from "../types/index.
|
|
1
|
+
import { type ResolvedObject } from "./resolve-target.js";
|
|
2
|
+
import type { OpenedRoute, ResolvedDimahS3Config, ResolvedRoute, RouteOperation, StoredObjectContext } from "../types/index.js";
|
|
3
3
|
export type OpenedTarget<F extends RouteOperation> = {
|
|
4
4
|
route: OpenedRoute<F>;
|
|
5
5
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeObjectKey, type S3ObjectAcl } from "@dimah-s3/core";
|
|
2
|
-
import type { ObjectS3Headers, OpenedRoute, ResolvedRoute, UploadObjectContext } from "../types/index.
|
|
2
|
+
import type { ObjectS3Headers, OpenedRoute, ResolvedRoute, UploadObjectContext } from "../types/index.js";
|
|
3
3
|
export type ResolvedObject = {
|
|
4
4
|
key: string;
|
|
5
5
|
bucket: string;
|
package/dist/index.js
CHANGED
|
@@ -1053,7 +1053,7 @@ async function handleComplete(config, input, request) {
|
|
|
1053
1053
|
const uploadId = input.uploadId;
|
|
1054
1054
|
const parts = [
|
|
1055
1055
|
...new Set(input.parts.map(({ partNumber }) => partNumber))
|
|
1056
|
-
].
|
|
1056
|
+
].toSorted((a, b) => a - b);
|
|
1057
1057
|
const partRefs = parts.map((partNumber) => ({ partNumber }));
|
|
1058
1058
|
await runHook(route2.upload.multipart.guard, {
|
|
1059
1059
|
...stored,
|
|
@@ -1664,7 +1664,7 @@ function applyPlugins(config) {
|
|
|
1664
1664
|
const endpoints = {};
|
|
1665
1665
|
for (const plugin of plugins) {
|
|
1666
1666
|
for (const [name, endpoint] of Object.entries(plugin.endpoints ?? {})) {
|
|
1667
|
-
if (reservedNames.has(name) || name
|
|
1667
|
+
if (reservedNames.has(name) || Object.hasOwn(endpoints, name)) {
|
|
1668
1668
|
throw new Error(
|
|
1669
1669
|
`Plugin "${plugin.id}" endpoint "${name}" collides with an existing endpoint.`
|
|
1670
1670
|
);
|