lemon-model 1.2.4 → 1.5.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.
Files changed (36) hide show
  1. package/dist/esm/upload/engine/engine.js +204 -0
  2. package/dist/esm/upload/engine/engine.js.map +1 -0
  3. package/dist/esm/upload/engine/executors.js +57 -0
  4. package/dist/esm/upload/engine/executors.js.map +1 -0
  5. package/dist/esm/upload/engine/index.js +13 -0
  6. package/dist/esm/upload/engine/index.js.map +1 -0
  7. package/dist/esm/upload/engine/progress.js +52 -0
  8. package/dist/esm/upload/engine/progress.js.map +1 -0
  9. package/dist/esm/upload/index.js +11 -0
  10. package/dist/esm/upload/index.js.map +1 -0
  11. package/dist/esm/upload/testing.js +80 -0
  12. package/dist/esm/upload/testing.js.map +1 -0
  13. package/dist/esm/upload/types.js +84 -0
  14. package/dist/esm/upload/types.js.map +1 -0
  15. package/dist/upload/engine/engine.d.ts +73 -0
  16. package/dist/upload/engine/engine.js +210 -0
  17. package/dist/upload/engine/engine.js.map +1 -0
  18. package/dist/upload/engine/executors.d.ts +44 -0
  19. package/dist/upload/engine/executors.js +62 -0
  20. package/dist/upload/engine/executors.js.map +1 -0
  21. package/dist/upload/engine/index.d.ts +12 -0
  22. package/dist/upload/engine/index.js +29 -0
  23. package/dist/upload/engine/index.js.map +1 -0
  24. package/dist/upload/engine/progress.d.ts +48 -0
  25. package/dist/upload/engine/progress.js +57 -0
  26. package/dist/upload/engine/progress.js.map +1 -0
  27. package/dist/upload/index.d.ts +10 -0
  28. package/dist/upload/index.js +27 -0
  29. package/dist/upload/index.js.map +1 -0
  30. package/dist/upload/testing.d.ts +23 -0
  31. package/dist/upload/testing.js +83 -0
  32. package/dist/upload/testing.js.map +1 -0
  33. package/dist/upload/types.d.ts +254 -0
  34. package/dist/upload/types.js +89 -0
  35. package/dist/upload/types.js.map +1 -0
  36. package/package.json +26 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.js","sourceRoot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EAAE,aAAa;KAC3B;CACJ,CAAC;AAEF;;;;GAIG;AACU,QAAA,mCAAmC,GAAiB;IAC7D,MAAM,EAAE;QACJ,EAAE,EAAE,QAAQ;QACZ,MAAM,EAAE,qBAAa,CAAC,MAAM;QAC5B,MAAM,EAAE,qBAAa,CAAC,KAAK;QAC3B,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,WAAW;QACxB,WAAW,EAAE,MAAM;QACnB,GAAG,EAAE,oCAAoC;KAC5C;IACD,iBAAiB,EAAE;QACf,IAAI,EAAE,4BAAoB,CAAC,YAAY;QACvC,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,iEAAiE;QACtE,OAAO,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE;QACzC,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,aAAa;KAC3B;CACJ,CAAC;AAEF,gFAAgF;AACnE,QAAA,sBAAsB,GAAiB;IAChD,MAAM,EAAE;QACJ,MAAM,EAAE,qBAAa,CAAC,MAAM;QAC5B,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,WAAW;QACxB,WAAW,EAAE,OAAO;QACpB,KAAK,EAAE,mCAAmC;KAC7C;CACJ,CAAC"}
@@ -0,0 +1,254 @@
1
+ /**
2
+ * `upload/types.ts`
3
+ * - client <-> server contract for uploading files.
4
+ * - transport-neutral: the client always runs `start` -> transfer -> `complete`; whether the server
5
+ * stores bytes inline (base64 in JSON) or hands out a presigned PUT only changes which
6
+ * `UploadTransfer` variant it issues.
7
+ * - runtime-neutral like `socket/`: no Node, DOM, or AWS SDK types. Storage coordinates
8
+ * (bucket, key, region) never appear here.
9
+ * - model-neutral: nothing here imports or names lemon-core's Model/View/Body/Head layers or the `$`
10
+ * embed marker. two shapes carry the vocabulary instead — `UploadContent` (bytes as declared) and
11
+ * `UploadResource` (bytes as stored, with an address). how a server maps them onto its own model
12
+ * layer, and how it embeds an upload in another record, is the server's concern.
13
+ *
14
+ * @copyright (C) 2026 LemonCloud Co Ltd. - All Rights Reserved.
15
+ */
16
+ /** kind of stored content */
17
+ export declare const UPLOAD_STEREO: {
18
+ readonly image: "image";
19
+ readonly video: "video";
20
+ readonly sound: "sound";
21
+ readonly docs: "docs";
22
+ };
23
+ export declare type UploadStereo = typeof UPLOAD_STEREO[keyof typeof UPLOAD_STEREO];
24
+ /** lifecycle of one upload as the client sees it. `url` is meaningful only when `stored` */
25
+ export declare const UPLOAD_STATUS: {
26
+ /** ticket issued; bytes not confirmed by the server yet */
27
+ readonly pending: "pending";
28
+ /** bytes durable and `url` valid */
29
+ readonly stored: "stored";
30
+ /** terminal; `error` carries the server's detail */
31
+ readonly failed: "failed";
32
+ };
33
+ export declare type UploadStatus = typeof UPLOAD_STATUS[keyof typeof UPLOAD_STATUS];
34
+ /** how bytes travel. a new transfer method arrives as a new kind; the flow around it does not change */
35
+ export declare const UPLOAD_TRANSFER_KIND: {
36
+ /** base64 in a JSON body, through the `send` operation */
37
+ readonly inline: "inline";
38
+ /** HTTP PUT straight to storage, to a server-issued url with its headers */
39
+ readonly presignedPut: "presigned-put";
40
+ };
41
+ export declare type UploadTransferKind = typeof UPLOAD_TRANSFER_KIND[keyof typeof UPLOAD_TRANSFER_KIND];
42
+ /**
43
+ * one payload of bytes as the client declares it. it has no identity and no address of its own.
44
+ * - `contentType` and `contentSize` are required: the server picks the transfer and validates limits
45
+ * from them before any byte moves.
46
+ */
47
+ export interface UploadContent {
48
+ contentType: string;
49
+ contentSize: number;
50
+ /** pixel size for image/video. declared by the client; the server does not verify it */
51
+ width?: number;
52
+ height?: number;
53
+ /**
54
+ * sha256 hex(64). optional forever: servers MUST accept uploads without it, MUST verify it when given.
55
+ * on a thumbnail the server MAY verify it the same way for that transfer; completion-time cross-check applies only to the original's hash.
56
+ */
57
+ hash?: string;
58
+ }
59
+ /**
60
+ * bytes the server holds, and where to fetch them.
61
+ * - `url` may be time-limited and re-issued on every read: use it when received, never persist it.
62
+ * - the content fields are what the server can vouch for, so every one is optional: a server that
63
+ * only confirmed the object exists (a thumbnail) knows nothing beyond the address.
64
+ */
65
+ export interface UploadResource extends Partial<UploadContent> {
66
+ url: string;
67
+ }
68
+ /**
69
+ * one upload intent: a slot of `start`.
70
+ * - `id` set = re-issue transfers for an existing upload. for a still-`pending` one (expired ticket)
71
+ * that is both transfers; for a `stored` one it is `thumbnailTransfer` only, because stored bytes
72
+ * are immutable.
73
+ */
74
+ export interface UploadIntent extends UploadContent {
75
+ id?: string;
76
+ /** file name as the sender picked it */
77
+ name: string;
78
+ /** a preview the client made. the server stores it beside the original and never derives it */
79
+ thumbnail?: UploadContent;
80
+ }
81
+ /**
82
+ * one upload as the server reports it: the declaration, its lifecycle, and — once `stored` — its address.
83
+ * - the content fields echo the intent. `url` is present iff `status` is `stored` (see `UploadStored`).
84
+ * - a server may answer with more fields than these; a client relies on these only.
85
+ */
86
+ export interface Upload extends Partial<UploadContent> {
87
+ /** absent only for a slot rejected at `start` validation: nothing was created */
88
+ id?: string;
89
+ status: UploadStatus;
90
+ /** human-readable detail when `failed`; the format is the server's. branch on `status`, not on this string */
91
+ error?: string;
92
+ stereo?: UploadStereo;
93
+ /** file name as the sender picked it */
94
+ name?: string;
95
+ /** url to serve; may be time-limited and re-issued on every read — do not persist it. present iff `stored` */
96
+ url?: string;
97
+ /** preview stored alongside the original: present only once the intent declared one and its bytes arrived */
98
+ thumbnail?: UploadResource;
99
+ }
100
+ /** an upload whose bytes are durable: it has an `id` and it is an `UploadResource` */
101
+ export declare type UploadStored = Upload & UploadResource & {
102
+ id: string;
103
+ };
104
+ export declare const isUploadStored: (upload: Upload) => upload is UploadStored;
105
+ /** transfer instruction: send base64 through `UploadSupportable.send()` */
106
+ export interface UploadInlineTransfer {
107
+ kind: typeof UPLOAD_TRANSFER_KIND.inline;
108
+ /** max original bytes (before base64) this server accepts inline */
109
+ maxBytes: number;
110
+ }
111
+ /**
112
+ * transfer instruction: PUT the raw bytes to `url` with `headers` verbatim.
113
+ * - `url` is a credential. never log, persist, or put it in an error message.
114
+ * - `expiresAt` is an upper bound only (signing credentials may expire earlier). on 403 re-`start` with `id`.
115
+ */
116
+ export interface UploadPresignedPutTransfer {
117
+ kind: typeof UPLOAD_TRANSFER_KIND.presignedPut;
118
+ method: 'PUT';
119
+ url: string;
120
+ /**
121
+ * every header the signature covers; send them unchanged.
122
+ * - EXCEPT the ones the user agent owns: `content-length` and `host`. `fetch` and
123
+ * `XMLHttpRequest` forbid setting them and the UA fills them from the request itself,
124
+ * so a shell adapter must drop them from this map before sending. The signature still
125
+ * matches because the UA's value is the one that was signed.
126
+ */
127
+ headers: Record<string, string>;
128
+ maxBytes: number;
129
+ /** epoch-ms */
130
+ expiresAt?: number;
131
+ }
132
+ export declare type UploadTransfer = UploadInlineTransfer | UploadPresignedPutTransfer;
133
+ /**
134
+ * a transfer that carries its own destination, so it can deliver any payload of an upload.
135
+ * - `inline` is not one: it goes through `send`, which addresses the whole upload, so a thumbnail
136
+ * sent that way would overwrite the original.
137
+ * - a new kind is listed here explicitly, never by default.
138
+ */
139
+ export declare type UploadDirectTransfer = UploadPresignedPutTransfer;
140
+ /**
141
+ * one slot of `start`'s answer.
142
+ * - `upload` is safe to store and log. `transfer` and `thumbnailTransfer` are each consumed once by
143
+ * the executor and dropped.
144
+ * - nothing to send at all = neither `transfer` nor `thumbnailTransfer`: already `stored` (dedup)
145
+ * or `failed` at validation. `transfer` alone may be absent while `thumbnailTransfer` is present —
146
+ * that is a `stored` upload getting a thumbnail added; its bytes are immutable.
147
+ */
148
+ export interface UploadTicket {
149
+ upload: Upload;
150
+ transfer?: UploadTransfer;
151
+ /** the thumbnail's transfer, if the intent declared one and the server can issue it */
152
+ thumbnailTransfer?: UploadDirectTransfer;
153
+ }
154
+ /** request of the `start` operation */
155
+ export interface UploadStartRequest {
156
+ list: UploadIntent[];
157
+ /** transfer kinds this client can execute, preferred first. absent = `['inline']` */
158
+ transfers?: UploadTransferKind[];
159
+ }
160
+ /** same length and order as `UploadStartRequest.list` */
161
+ export interface UploadStartResult {
162
+ list: UploadTicket[];
163
+ }
164
+ /** request of the `send` operation (inline transfer only) */
165
+ export interface UploadSendRequest {
166
+ /** base64 of the whole content; size must match the declared `contentSize` */
167
+ content: string;
168
+ }
169
+ /** who produced a failure */
170
+ export declare const UPLOAD_FAILURE_SOURCE: {
171
+ /** the upload API answered with an error */
172
+ readonly api: "api";
173
+ /** the storage endpoint (presigned PUT) answered with an error */
174
+ readonly storage: "storage";
175
+ /** the client gave up before or without a response */
176
+ readonly client: "client";
177
+ };
178
+ export declare type UploadFailureSource = typeof UPLOAD_FAILURE_SOURCE[keyof typeof UPLOAD_FAILURE_SOURCE];
179
+ /** normalized failure codes; the app branches on these, never on raw HTTP status */
180
+ export declare const UPLOAD_FAILURE_CODE: {
181
+ readonly invalid: "invalid";
182
+ readonly tooLarge: "too-large";
183
+ readonly unsupported: "unsupported";
184
+ readonly notAcceptable: "not-acceptable";
185
+ readonly notFound: "not-found";
186
+ readonly conflict: "conflict";
187
+ readonly expired: "expired";
188
+ readonly signature: "signature";
189
+ readonly checksum: "checksum";
190
+ readonly network: "network";
191
+ readonly aborted: "aborted";
192
+ readonly unknown: "unknown";
193
+ };
194
+ export declare type UploadFailureCode = typeof UPLOAD_FAILURE_CODE[keyof typeof UPLOAD_FAILURE_CODE];
195
+ /** failure as the client reports it (to the app, and to the server in `complete`) */
196
+ export interface UploadFailure {
197
+ source: UploadFailureSource;
198
+ code: UploadFailureCode;
199
+ /** HTTP status as observed, if any */
200
+ status?: number;
201
+ /** origin code: S3 `<Code>` or the lemon-core LABEL */
202
+ reason?: string;
203
+ /** human detail. MUST NOT contain a transfer url */
204
+ message?: string;
205
+ }
206
+ /** one slot of `complete`'s request */
207
+ export interface UploadCompleteItem {
208
+ id: string;
209
+ /** set when the transfer did not succeed; the server marks the upload `failed` */
210
+ failure?: UploadFailure;
211
+ }
212
+ /** request of the `complete` operation */
213
+ export interface UploadCompleteRequest {
214
+ list: UploadCompleteItem[];
215
+ }
216
+ /** same length and order as `UploadCompleteRequest.list` */
217
+ export interface UploadCompleteResult {
218
+ list: Upload[];
219
+ }
220
+ /**
221
+ * the four operations. a server exposes them over `UPLOAD_ROUTES`; a client adapter implements this to call them.
222
+ * - all four require the caller's normal API auth; a presigned url is the only unauthenticated hop.
223
+ */
224
+ export interface UploadSupportable {
225
+ /** declare intents; get tickets. validation failures come back per slot as `failed`, never as HTTP 4xx */
226
+ start(body: UploadStartRequest): Promise<UploadStartResult>;
227
+ /** inline transfer: deliver the bytes of one pending upload */
228
+ send(id: string, body: UploadSendRequest): Promise<Upload>;
229
+ /** confirm; the server verifies what it cannot see (presigned) and settles `status`. idempotent */
230
+ complete(body: UploadCompleteRequest): Promise<UploadCompleteResult>;
231
+ /** re-read for the current state */
232
+ read(id: string): Promise<Upload>;
233
+ }
234
+ /** HTTP binding relative to the server's upload base path (lemon-core `/{type}/{id}/{cmd}` shape) */
235
+ export declare const UPLOAD_ROUTES: {
236
+ readonly start: {
237
+ readonly method: "POST";
238
+ readonly path: "/start";
239
+ };
240
+ readonly send: {
241
+ readonly method: "POST";
242
+ readonly path: "/{id}/send";
243
+ };
244
+ readonly complete: {
245
+ readonly method: "POST";
246
+ readonly path: "/complete";
247
+ };
248
+ readonly read: {
249
+ readonly method: "GET";
250
+ readonly path: "/{id}";
251
+ };
252
+ };
253
+ /** shared stereo derivation so an optimistic client tile and the server agree */
254
+ export declare const uploadStereoOf: (contentType: string) => UploadStereo | undefined;
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ /**
3
+ * `upload/types.ts`
4
+ * - client <-> server contract for uploading files.
5
+ * - transport-neutral: the client always runs `start` -> transfer -> `complete`; whether the server
6
+ * stores bytes inline (base64 in JSON) or hands out a presigned PUT only changes which
7
+ * `UploadTransfer` variant it issues.
8
+ * - runtime-neutral like `socket/`: no Node, DOM, or AWS SDK types. Storage coordinates
9
+ * (bucket, key, region) never appear here.
10
+ * - model-neutral: nothing here imports or names lemon-core's Model/View/Body/Head layers or the `$`
11
+ * embed marker. two shapes carry the vocabulary instead — `UploadContent` (bytes as declared) and
12
+ * `UploadResource` (bytes as stored, with an address). how a server maps them onto its own model
13
+ * layer, and how it embeds an upload in another record, is the server's concern.
14
+ *
15
+ * @copyright (C) 2026 LemonCloud Co Ltd. - All Rights Reserved.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.uploadStereoOf = exports.UPLOAD_ROUTES = exports.UPLOAD_FAILURE_CODE = exports.UPLOAD_FAILURE_SOURCE = exports.isUploadStored = exports.UPLOAD_TRANSFER_KIND = exports.UPLOAD_STATUS = exports.UPLOAD_STEREO = void 0;
19
+ /** kind of stored content */
20
+ exports.UPLOAD_STEREO = {
21
+ image: 'image',
22
+ video: 'video',
23
+ sound: 'sound',
24
+ docs: 'docs',
25
+ };
26
+ /** lifecycle of one upload as the client sees it. `url` is meaningful only when `stored` */
27
+ exports.UPLOAD_STATUS = {
28
+ /** ticket issued; bytes not confirmed by the server yet */
29
+ pending: 'pending',
30
+ /** bytes durable and `url` valid */
31
+ stored: 'stored',
32
+ /** terminal; `error` carries the server's detail */
33
+ failed: 'failed',
34
+ };
35
+ /** how bytes travel. a new transfer method arrives as a new kind; the flow around it does not change */
36
+ exports.UPLOAD_TRANSFER_KIND = {
37
+ /** base64 in a JSON body, through the `send` operation */
38
+ inline: 'inline',
39
+ /** HTTP PUT straight to storage, to a server-issued url with its headers */
40
+ presignedPut: 'presigned-put',
41
+ };
42
+ const isUploadStored = (upload) => upload.status === exports.UPLOAD_STATUS.stored && typeof upload.id === 'string' && typeof upload.url === 'string';
43
+ exports.isUploadStored = isUploadStored;
44
+ /** who produced a failure */
45
+ exports.UPLOAD_FAILURE_SOURCE = {
46
+ /** the upload API answered with an error */
47
+ api: 'api',
48
+ /** the storage endpoint (presigned PUT) answered with an error */
49
+ storage: 'storage',
50
+ /** the client gave up before or without a response */
51
+ client: 'client',
52
+ };
53
+ /** normalized failure codes; the app branches on these, never on raw HTTP status */
54
+ exports.UPLOAD_FAILURE_CODE = {
55
+ invalid: 'invalid',
56
+ tooLarge: 'too-large',
57
+ unsupported: 'unsupported',
58
+ notAcceptable: 'not-acceptable',
59
+ notFound: 'not-found',
60
+ conflict: 'conflict',
61
+ expired: 'expired',
62
+ signature: 'signature',
63
+ checksum: 'checksum',
64
+ network: 'network',
65
+ aborted: 'aborted',
66
+ unknown: 'unknown',
67
+ };
68
+ /** HTTP binding relative to the server's upload base path (lemon-core `/{type}/{id}/{cmd}` shape) */
69
+ exports.UPLOAD_ROUTES = {
70
+ start: { method: 'POST', path: '/start' },
71
+ send: { method: 'POST', path: '/{id}/send' },
72
+ complete: { method: 'POST', path: '/complete' },
73
+ read: { method: 'GET', path: '/{id}' },
74
+ };
75
+ /** shared stereo derivation so an optimistic client tile and the server agree */
76
+ const uploadStereoOf = (contentType) => {
77
+ const type = contentType.toLowerCase().split(';')[0].trim();
78
+ if (type.startsWith('image/'))
79
+ return exports.UPLOAD_STEREO.image;
80
+ if (type.startsWith('video/'))
81
+ return exports.UPLOAD_STEREO.video;
82
+ if (type.startsWith('audio/'))
83
+ return exports.UPLOAD_STEREO.sound;
84
+ if (type === 'application/pdf')
85
+ return exports.UPLOAD_STEREO.docs;
86
+ return undefined;
87
+ };
88
+ exports.uploadStereoOf = uploadStereoOf;
89
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/upload/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,6BAA6B;AAChB,QAAA,aAAa,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACN,CAAC;AAGX,4FAA4F;AAC/E,QAAA,aAAa,GAAG;IACzB,2DAA2D;IAC3D,OAAO,EAAE,SAAS;IAClB,oCAAoC;IACpC,MAAM,EAAE,QAAQ;IAChB,oDAAoD;IACpD,MAAM,EAAE,QAAQ;CACV,CAA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FAAiF;AAC1E,MAAM,cAAc,GAAG,CAAC,WAAmB,EAA4B,EAAE;IAC5E,MAAM,IAAI,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5D,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,qBAAa,CAAC,KAAK,CAAC;IAC1D,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,qBAAa,CAAC,KAAK,CAAC;IAC1D,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,qBAAa,CAAC,KAAK,CAAC;IAC1D,IAAI,IAAI,KAAK,iBAAiB;QAAE,OAAO,qBAAa,CAAC,IAAI,CAAC;IAC1D,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAPW,QAAA,cAAc,kBAOzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemon-model",
3
- "version": "1.2.4",
3
+ "version": "1.5.0",
4
4
  "description": "Common shared model definitions for Lemon Micro-Service Platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -42,8 +42,33 @@
42
42
  "require": "./dist/logtrace/testing.js",
43
43
  "default": "./dist/logtrace/testing.js"
44
44
  },
45
+ "./upload": {
46
+ "types": "./dist/upload/index.d.ts",
47
+ "import": "./dist/esm/upload/index.js",
48
+ "require": "./dist/upload/index.js",
49
+ "default": "./dist/upload/index.js"
50
+ },
51
+ "./upload/testing": {
52
+ "types": "./dist/upload/testing.d.ts",
53
+ "import": "./dist/esm/upload/testing.js",
54
+ "require": "./dist/upload/testing.js",
55
+ "default": "./dist/upload/testing.js"
56
+ },
57
+ "./upload/engine": {
58
+ "types": "./dist/upload/engine/index.d.ts",
59
+ "import": "./dist/esm/upload/engine/index.js",
60
+ "require": "./dist/upload/engine/index.js",
61
+ "default": "./dist/upload/engine/index.js"
62
+ },
45
63
  "./package.json": "./package.json"
46
64
  },
65
+ "typesVersions": {
66
+ "*": {
67
+ "upload": ["dist/upload/index.d.ts"],
68
+ "upload/testing": ["dist/upload/testing.d.ts"],
69
+ "upload/engine": ["dist/upload/engine/index.d.ts"]
70
+ }
71
+ },
47
72
  "scripts": {
48
73
  "build": "npm run build-ts && npm run build-esm",
49
74
  "build-ts": "tsc -v && tsc",