@dimah-s3/server 1.7.0 → 2.0.0-beta.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 +72 -16
- package/dist/adapters/express.d.ts +7 -7
- package/dist/adapters/express.d.ts.map +1 -1
- package/dist/adapters/express.js +73 -96
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/fastify.d.ts +11 -5
- package/dist/adapters/fastify.d.ts.map +1 -1
- package/dist/adapters/fastify.js +73 -96
- package/dist/adapters/fastify.js.map +1 -1
- package/dist/adapters/node.d.ts +20 -3
- package/dist/adapters/node.d.ts.map +1 -1
- package/dist/adapters/node.js +71 -94
- package/dist/adapters/node.js.map +1 -1
- package/dist/api/context.d.ts +8 -4
- package/dist/api/context.d.ts.map +1 -1
- package/dist/api/{routes/index.d.ts → core-endpoints.d.ts} +43 -68
- package/dist/api/core-endpoints.d.ts.map +1 -0
- package/dist/api/create-s3-endpoint.d.ts +70 -48
- package/dist/api/create-s3-endpoint.d.ts.map +1 -1
- package/dist/api/create-s3-middleware.d.ts +19 -16
- package/dist/api/create-s3-middleware.d.ts.map +1 -1
- package/dist/api/router-context.d.ts +23 -0
- package/dist/api/router-context.d.ts.map +1 -0
- package/dist/api/router.d.ts +15 -5
- package/dist/api/router.d.ts.map +1 -1
- package/dist/config/feature-toggle.d.ts +16 -0
- package/dist/config/feature-toggle.d.ts.map +1 -0
- package/dist/config/resolve-config.d.ts +9 -0
- package/dist/config/resolve-config.d.ts.map +1 -0
- package/dist/config/resolve-routes.d.ts +37 -0
- package/dist/config/resolve-routes.d.ts.map +1 -0
- package/dist/dimah-s3.d.ts +22 -32
- package/dist/dimah-s3.d.ts.map +1 -1
- package/dist/helpers/authorize-download.d.ts +25 -0
- package/dist/helpers/authorize-download.d.ts.map +1 -0
- package/dist/helpers/aws-errors.d.ts +16 -0
- package/dist/helpers/aws-errors.d.ts.map +1 -0
- package/dist/helpers/best-effort.d.ts +22 -3
- package/dist/helpers/best-effort.d.ts.map +1 -1
- package/dist/helpers/checksum-config.d.ts +13 -0
- package/dist/helpers/checksum-config.d.ts.map +1 -0
- package/dist/helpers/constraints.d.ts +17 -12
- package/dist/helpers/constraints.d.ts.map +1 -1
- package/dist/helpers/error-boundary.d.ts +28 -0
- package/dist/helpers/error-boundary.d.ts.map +1 -0
- package/dist/helpers/finalize-confirmed.d.ts +42 -13
- package/dist/helpers/finalize-confirmed.d.ts.map +1 -1
- package/dist/helpers/head-object.d.ts +6 -9
- package/dist/helpers/head-object.d.ts.map +1 -1
- package/dist/helpers/hooks.d.ts +29 -15
- package/dist/helpers/hooks.d.ts.map +1 -1
- package/dist/helpers/inline-types.d.ts +24 -7
- package/dist/helpers/inline-types.d.ts.map +1 -1
- package/dist/helpers/list-parts.d.ts +4 -6
- package/dist/helpers/list-parts.d.ts.map +1 -1
- package/dist/helpers/metadata-encoding.d.ts +15 -0
- package/dist/helpers/metadata-encoding.d.ts.map +1 -0
- package/dist/helpers/object-meta.d.ts +39 -0
- package/dist/helpers/object-meta.d.ts.map +1 -0
- package/dist/helpers/object-s3.d.ts +5 -2
- package/dist/helpers/object-s3.d.ts.map +1 -1
- package/dist/helpers/open-target.d.ts +89 -0
- package/dist/helpers/open-target.d.ts.map +1 -0
- package/dist/helpers/part-layout.d.ts +19 -0
- package/dist/helpers/part-layout.d.ts.map +1 -0
- package/dist/helpers/presign.d.ts +54 -0
- package/dist/helpers/presign.d.ts.map +1 -0
- package/dist/helpers/request.d.ts +6 -11
- package/dist/helpers/request.d.ts.map +1 -1
- package/dist/helpers/resolve-target.d.ts +28 -20
- package/dist/helpers/resolve-target.d.ts.map +1 -1
- package/dist/helpers/sniff-object.d.ts +22 -0
- package/dist/helpers/sniff-object.d.ts.map +1 -0
- package/dist/helpers/ticket.d.ts +75 -0
- package/dist/helpers/ticket.d.ts.map +1 -0
- package/dist/index.d.ts +4 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2647 -1579
- package/dist/index.js.map +1 -1
- package/dist/operations/catalog.d.ts +16 -0
- package/dist/operations/catalog.d.ts.map +1 -0
- package/dist/operations/confirm.d.ts +19 -0
- package/dist/operations/confirm.d.ts.map +1 -0
- package/dist/operations/delete-many.d.ts +18 -0
- package/dist/operations/delete-many.d.ts.map +1 -0
- package/dist/operations/delete.d.ts +14 -0
- package/dist/operations/delete.d.ts.map +1 -0
- package/dist/operations/download.d.ts +20 -0
- package/dist/operations/download.d.ts.map +1 -0
- package/dist/operations/file.d.ts +38 -0
- package/dist/operations/file.d.ts.map +1 -0
- package/dist/operations/multipart/abort.d.ts +20 -0
- package/dist/operations/multipart/abort.d.ts.map +1 -0
- package/dist/operations/multipart/complete.d.ts +21 -0
- package/dist/operations/multipart/complete.d.ts.map +1 -0
- package/dist/operations/multipart/init.d.ts +19 -0
- package/dist/operations/multipart/init.d.ts.map +1 -0
- package/dist/operations/multipart/list-parts.d.ts +11 -0
- package/dist/operations/multipart/list-parts.d.ts.map +1 -0
- package/dist/operations/multipart/open-multipart.d.ts +25 -0
- package/dist/operations/multipart/open-multipart.d.ts.map +1 -0
- package/dist/operations/multipart/sign-part.d.ts +20 -0
- package/dist/operations/multipart/sign-part.d.ts.map +1 -0
- package/dist/operations/put.d.ts +18 -0
- package/dist/operations/put.d.ts.map +1 -0
- package/dist/operations/run-operation.d.ts +18 -0
- package/dist/operations/run-operation.d.ts.map +1 -0
- package/dist/operations/s3-api.d.ts +12 -0
- package/dist/operations/s3-api.d.ts.map +1 -0
- package/dist/operations/upload.d.ts +19 -0
- package/dist/operations/upload.d.ts.map +1 -0
- package/dist/plugin/apply-plugins.d.ts +9 -11
- package/dist/plugin/apply-plugins.d.ts.map +1 -1
- package/dist/plugin/chain-hooks.d.ts +12 -9
- package/dist/plugin/chain-hooks.d.ts.map +1 -1
- package/dist/plugin/define-plugin.d.ts +11 -4
- package/dist/plugin/define-plugin.d.ts.map +1 -1
- package/dist/plugin/index.d.ts +1 -2
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/types.d.ts +52 -56
- package/dist/plugin/types.d.ts.map +1 -1
- package/dist/plugins.d.ts +10 -8
- package/dist/plugins.d.ts.map +1 -1
- package/dist/plugins.js +325 -1627
- package/dist/plugins.js.map +1 -1
- package/dist/route.d.ts +0 -1
- package/dist/route.d.ts.map +1 -1
- package/dist/types/config.d.ts +171 -172
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/hook-contexts.d.ts +139 -147
- package/dist/types/hook-contexts.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/locals.d.ts +37 -0
- package/dist/types/locals.d.ts.map +1 -0
- package/dist/types/resolved.d.ts +118 -0
- package/dist/types/resolved.d.ts.map +1 -0
- package/package.json +9 -13
- package/dist/api/bind-endpoints.d.ts +0 -12
- package/dist/api/bind-endpoints.d.ts.map +0 -1
- package/dist/api/index.d.ts +0 -6
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -1353
- package/dist/api/index.js.map +0 -1
- package/dist/api/routes/catalog.d.ts +0 -9
- package/dist/api/routes/catalog.d.ts.map +0 -1
- package/dist/api/routes/confirm.d.ts +0 -13
- package/dist/api/routes/confirm.d.ts.map +0 -1
- package/dist/api/routes/delete-batch.d.ts +0 -14
- package/dist/api/routes/delete-batch.d.ts.map +0 -1
- package/dist/api/routes/delete.d.ts +0 -26
- package/dist/api/routes/delete.d.ts.map +0 -1
- package/dist/api/routes/download.d.ts +0 -21
- package/dist/api/routes/download.d.ts.map +0 -1
- package/dist/api/routes/file.d.ts +0 -20
- package/dist/api/routes/file.d.ts.map +0 -1
- package/dist/api/routes/index.d.ts.map +0 -1
- package/dist/api/routes/multipart/abort.d.ts +0 -16
- package/dist/api/routes/multipart/abort.d.ts.map +0 -1
- package/dist/api/routes/multipart/complete.d.ts +0 -22
- package/dist/api/routes/multipart/complete.d.ts.map +0 -1
- package/dist/api/routes/multipart/init.d.ts +0 -22
- package/dist/api/routes/multipart/init.d.ts.map +0 -1
- package/dist/api/routes/multipart/list-parts.d.ts +0 -17
- package/dist/api/routes/multipart/list-parts.d.ts.map +0 -1
- package/dist/api/routes/multipart/part.d.ts +0 -20
- package/dist/api/routes/multipart/part.d.ts.map +0 -1
- package/dist/api/routes/upload.d.ts +0 -22
- package/dist/api/routes/upload.d.ts.map +0 -1
- package/dist/errors.d.ts +0 -23
- package/dist/errors.d.ts.map +0 -1
- package/dist/helpers/expires.d.ts +0 -21
- package/dist/helpers/expires.d.ts.map +0 -1
- package/dist/helpers/features.d.ts +0 -17
- package/dist/helpers/features.d.ts.map +0 -1
- package/dist/helpers/index.d.ts +0 -19
- package/dist/helpers/index.d.ts.map +0 -1
- package/dist/helpers/is-aws-not-found.d.ts +0 -5
- package/dist/helpers/is-aws-not-found.d.ts.map +0 -1
- package/dist/helpers/previous-key.d.ts +0 -5
- package/dist/helpers/previous-key.d.ts.map +0 -1
- package/dist/helpers/resolve-route.d.ts +0 -33
- package/dist/helpers/resolve-route.d.ts.map +0 -1
- package/dist/plugin/hook-registry.d.ts +0 -21
- package/dist/plugin/hook-registry.d.ts.map +0 -1
- package/dist/put.d.ts +0 -15
- package/dist/put.d.ts.map +0 -1
package/dist/plugin/types.d.ts
CHANGED
|
@@ -1,86 +1,82 @@
|
|
|
1
1
|
import type { Endpoint } from "better-call";
|
|
2
|
-
import type { DeleteConfig, DownloadConfig, MultipartConfig,
|
|
3
|
-
import type {
|
|
4
|
-
type
|
|
2
|
+
import type { DeleteConfig, DimahS3Config, DimahS3Logger, DownloadConfig, MultipartConfig, TicketSubject, UploadConfig } from "../types/config.js";
|
|
3
|
+
import type { GuardContext } from "../types/hook-contexts.js";
|
|
4
|
+
import type { Guard } from "../types/locals.js";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Hooks a plugin adds. Plugin hooks run before the user's hook for the same
|
|
7
|
+
* slot, in plugin order, for guards and lifecycle hooks alike. A route that
|
|
8
|
+
* sets `plugins: { [id]: false }` skips the plugin's route hooks.
|
|
9
9
|
*/
|
|
10
10
|
export type DimahS3PluginHooks = {
|
|
11
|
-
guard
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/** Runs before every operation, before the user's instance guard. */
|
|
12
|
+
guard?: Guard<GuardContext>;
|
|
13
|
+
/**
|
|
14
|
+
* Binds upload tickets to a subject when the config sets no
|
|
15
|
+
* `ticketSubject`. The first plugin that provides one is used.
|
|
16
|
+
*/
|
|
17
|
+
ticketSubject?: TicketSubject;
|
|
18
|
+
upload?: Pick<UploadConfig, "guard" | "onStart" | "confirmGuard" | "onConfirmed"> & {
|
|
19
|
+
multipart?: Pick<MultipartConfig, "guard" | "onAbort">;
|
|
14
20
|
};
|
|
15
|
-
download?:
|
|
16
|
-
delete?:
|
|
21
|
+
download?: Pick<DownloadConfig, "guard" | "onPresigned">;
|
|
22
|
+
delete?: Pick<DeleteConfig, "guard" | "onDeleted">;
|
|
17
23
|
};
|
|
18
|
-
/**
|
|
19
|
-
* Environment passed to {@link DimahS3Plugin.init}.
|
|
20
|
-
* Config is pre-merge (user config only) — use `isFeatureOn` for
|
|
21
|
-
* feature-flag checks. Routes are already validated before `init` runs.
|
|
22
|
-
*/
|
|
24
|
+
/** What {@link DimahS3Plugin.init} receives. */
|
|
23
25
|
export type PluginInitEnv = {
|
|
24
|
-
/**
|
|
26
|
+
/** The user config. The routes are already validated. */
|
|
25
27
|
config: Readonly<DimahS3Config>;
|
|
26
|
-
/**
|
|
28
|
+
/** Looks up a registered plugin by id. */
|
|
27
29
|
getPlugin: (id: string) => DimahS3Plugin | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* This plugin's options for a route (`routes[route].plugins[id]`).
|
|
32
|
+
* `false` means the route turned the plugin off, and `undefined` means the
|
|
33
|
+
* route sets nothing or does not exist.
|
|
34
|
+
*/
|
|
35
|
+
routeOptions: <T extends object>(route: string) => T | false | undefined;
|
|
36
|
+
/** The instance logger. */
|
|
37
|
+
logger: DimahS3Logger;
|
|
28
38
|
};
|
|
29
39
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
40
|
+
* A server plugin, such as `db()` from `@dimah-s3/db`. Build one with
|
|
41
|
+
* `definePlugin` so its `id` and `context` types are kept.
|
|
32
42
|
*
|
|
33
|
-
* @typeParam Id
|
|
34
|
-
*
|
|
35
|
-
* @typeParam TContext
|
|
36
|
-
* `dimahS3()`.
|
|
37
|
-
* @typeParam TEndpoints — better-call endpoints merged onto `s3.api`.
|
|
43
|
+
* @typeParam Id - The plugin id. It keys `s3.context` and the instance
|
|
44
|
+
* (`s3[id]`).
|
|
45
|
+
* @typeParam TContext - The value on `s3.context[id]` and `s3[id]`.
|
|
38
46
|
*/
|
|
39
|
-
export type DimahS3Plugin<Id extends string = string, TContext extends Record<string, unknown> = Record<string, unknown
|
|
40
|
-
/** Unique id
|
|
47
|
+
export type DimahS3Plugin<Id extends string = string, TContext extends Record<string, unknown> = Record<string, unknown>> = {
|
|
48
|
+
/** Unique id. A duplicate or an instance key such as `api` throws. */
|
|
41
49
|
id: Id;
|
|
42
50
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* Merge order remains plugins-array order (not topological).
|
|
51
|
+
* Ids of plugins that must be registered too. A missing or circular
|
|
52
|
+
* dependency throws at `dimahS3()`. Hooks still run in plugin order.
|
|
46
53
|
*/
|
|
47
54
|
dependsOn?: readonly string[];
|
|
48
55
|
/**
|
|
49
|
-
* Runs once
|
|
50
|
-
*
|
|
51
|
-
*
|
|
56
|
+
* Runs once at `dimahS3()`, in plugin order, after the routes are
|
|
57
|
+
* validated. Throw here to reject the config. It must be synchronous:
|
|
58
|
+
* returning a promise throws.
|
|
52
59
|
*/
|
|
53
60
|
init?: (env: PluginInitEnv) => void;
|
|
54
|
-
/** Lifecycle / guard hooks merged ahead of user config hooks. */
|
|
55
61
|
hooks?: DimahS3PluginHooks;
|
|
56
62
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
63
|
+
* HTTP endpoints mounted on the handler under `basePath`. Build them with
|
|
64
|
+
* `createS3Endpoint`. They are not added to `s3.api`.
|
|
59
65
|
*/
|
|
60
|
-
endpoints?:
|
|
61
|
-
/**
|
|
66
|
+
endpoints?: Record<string, Endpoint>;
|
|
67
|
+
/** Exposed on `s3.context[id]` and `s3[id]`. */
|
|
62
68
|
context?: TContext;
|
|
63
69
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
/** Plugin ids mapped to their `context` types. */
|
|
71
|
+
export type PluginContextMap<P extends readonly DimahS3Plugin[]> = {
|
|
72
|
+
[K in P[number] as K["id"]]: K extends DimahS3Plugin<string, infer Ctx> ? Ctx : never;
|
|
73
|
+
};
|
|
74
|
+
/** What `applyPlugins` returns to `dimahS3()`. */
|
|
75
|
+
export type AppliedPlugins<C> = {
|
|
67
76
|
/** Plugin contexts keyed by plugin id. */
|
|
68
77
|
context: C;
|
|
69
78
|
getPlugin: (id: string) => DimahS3Plugin | undefined;
|
|
70
|
-
/**
|
|
71
|
-
endpoints:
|
|
72
|
-
};
|
|
73
|
-
/** Map plugin ids → their `context` types. */
|
|
74
|
-
export type PluginContextMap<P extends readonly DimahS3Plugin[]> = {
|
|
75
|
-
[K in P[number] as K["id"]]: K extends DimahS3Plugin<string, infer Ctx> ? Ctx : never;
|
|
79
|
+
/** Every plugin endpoint, keyed by name, to mount beside the core ones. */
|
|
80
|
+
endpoints: Record<string, Endpoint>;
|
|
76
81
|
};
|
|
77
|
-
/** Map plugin endpoint names → better-call endpoints. */
|
|
78
|
-
export type PluginEndpointMap<P extends readonly DimahS3Plugin[]> = P extends readonly [] ? Record<string, never> : UnionToIntersection<P[number] extends {
|
|
79
|
-
endpoints?: infer E;
|
|
80
|
-
} ? E extends Record<string, Endpoint> ? E : Record<string, never> : Record<string, never>>;
|
|
81
|
-
type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : Record<string, never>;
|
|
82
|
-
/** Keys reserved on the dimahS3 instance — plugins may not use these as ids. */
|
|
83
|
-
export declare const RESERVED_PLUGIN_IDS: readonly ["handler", "api", "context", "getPlugin", "$ERROR_CODES", "$Infer", "upload", "confirm", "download", "catalog", "file", "delete", "deleteBatch", "put", "multipart"];
|
|
84
|
-
export type ReservedPluginId = (typeof RESERVED_PLUGIN_IDS)[number];
|
|
85
|
-
export {};
|
|
86
82
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,aAAa,EACb,YAAY,EACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,qEAAqE;IACrE,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,CAAC,EAAE,IAAI,CACX,YAAY,EACZ,OAAO,GAAG,SAAS,GAAG,cAAc,GAAG,aAAa,CACrD,GAAG;QAAE,SAAS,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC,CAAA;KAAE,CAAC;IAC/D,QAAQ,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,aAAa,CAAC,CAAC;IACzD,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC;CACpD,CAAC;AAEF,gDAAgD;AAChD,MAAM,MAAM,aAAa,GAAG;IAC1B,yDAAyD;IACzD,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IAChC,0CAA0C;IAC1C,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAC;IACrD;;;;OAIG;IACH,YAAY,EAAE,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,SAAS,CAAC;IACzE,2BAA2B;IAC3B,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,CACvB,EAAE,SAAS,MAAM,GAAG,MAAM,EAC1B,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAChE;IACF,sEAAsE;IACtE,EAAE,EAAE,EAAE,CAAC;IACP;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B;;;;OAIG;IACH,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACpC,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACrC,gDAAgD;IAChD,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,kDAAkD;AAClD,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,SAAS,aAAa,EAAE,IAAI;KAChE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,GACnE,GAAG,GACH,KAAK;CACV,CAAC;AAEF,kDAAkD;AAClD,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,0CAA0C;IAC1C,OAAO,EAAE,CAAC,CAAC;IACX,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAC;IACrD,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CACrC,CAAC"}
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export
|
|
1
|
+
export { createS3Endpoint } from "./api/create-s3-endpoint";
|
|
2
|
+
export type { S3Endpoint, S3EndpointMethod, S3EndpointOptions, } from "./api/create-s3-endpoint";
|
|
3
|
+
export { createS3Middleware } from "./api/create-s3-middleware";
|
|
4
|
+
export type { S3EndpointContext } from "./api/context";
|
|
5
|
+
export { isFeatureOn } from "./config/feature-toggle";
|
|
6
|
+
export { definePlugin } from "./plugin";
|
|
7
|
+
export type { DimahS3Plugin, DimahS3PluginHooks, PluginContextMap, PluginInitEnv, } from "./plugin";
|
|
8
|
+
export { isAwsNotFound } from "./helpers/aws-errors";
|
|
9
|
+
export { deleteObjectIfMatch, type ConditionalDeleteInput, } from "./helpers/best-effort";
|
|
10
|
+
export { readUploadMarker } from "./helpers/object-meta";
|
|
9
11
|
//# sourceMappingURL=plugins.d.ts.map
|
package/dist/plugins.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,GACd,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|