@papr/memory 1.0.0 → 1.2.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/CHANGELOG.md +25 -0
- package/README.md +11 -11
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +1 -2
- package/api-promise.d.ts.map +1 -1
- package/api-promise.js +2 -15
- package/api-promise.js.map +1 -1
- package/client.d.mts +192 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +15 -15
- package/client.d.ts.map +1 -1
- package/client.js +8 -51
- package/client.js.map +1 -1
- package/client.mjs +1 -11
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +3 -3
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js +4 -14
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +1 -11
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +2 -2
- package/core/uploads.d.ts.map +1 -1
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -2
- package/error.d.ts.map +1 -1
- package/error.js +2 -15
- package/error.js.map +1 -1
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +5 -5
- package/index.d.ts.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/request-options.d.mts +32 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +4 -4
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +2 -8
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +67 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +3 -3
- package/internal/uploads.d.ts.map +1 -1
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +2 -2
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/values.d.mts +16 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +6 -6
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.js +7 -20
- package/internal/utils.js.map +1 -1
- package/package.json +5 -4
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -2
- package/resource.d.ts.map +1 -1
- package/resource.js +2 -15
- package/resource.js.map +1 -1
- package/resources/document.d.mts +103 -0
- package/resources/document.d.mts.map +1 -0
- package/resources/document.d.ts +3 -3
- package/resources/document.d.ts.map +1 -1
- package/resources/index.d.mts +4 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/memory.d.mts +771 -0
- package/resources/memory.d.mts.map +1 -0
- package/resources/memory.d.ts +12 -4
- package/resources/memory.d.ts.map +1 -1
- package/resources/user.d.mts +139 -0
- package/resources/user.d.mts.map +1 -0
- package/resources/user.d.ts +3 -3
- package/resources/user.d.ts.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/resources/memory.ts +9 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -2
- package/uploads.d.ts.map +1 -1
- package/uploads.js +2 -15
- package/uploads.js.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/src/global.d.ts +0 -5
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { NullableHeaders } from "./headers.mjs";
|
|
2
|
+
import type { BodyInit } from "./builtin-types.mjs";
|
|
3
|
+
import type { HTTPMethod, MergedRequestInit } from "./types.mjs";
|
|
4
|
+
import { type HeadersLike } from "./headers.mjs";
|
|
5
|
+
export type FinalRequestOptions = RequestOptions & {
|
|
6
|
+
method: HTTPMethod;
|
|
7
|
+
path: string;
|
|
8
|
+
};
|
|
9
|
+
export type RequestOptions = {
|
|
10
|
+
method?: HTTPMethod;
|
|
11
|
+
path?: string;
|
|
12
|
+
query?: object | undefined | null;
|
|
13
|
+
body?: unknown;
|
|
14
|
+
headers?: HeadersLike;
|
|
15
|
+
maxRetries?: number;
|
|
16
|
+
stream?: boolean | undefined;
|
|
17
|
+
timeout?: number;
|
|
18
|
+
fetchOptions?: MergedRequestInit;
|
|
19
|
+
signal?: AbortSignal | undefined | null;
|
|
20
|
+
idempotencyKey?: string;
|
|
21
|
+
__binaryResponse?: boolean | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type EncodedContent = {
|
|
24
|
+
bodyHeaders: HeadersLike;
|
|
25
|
+
body: BodyInit;
|
|
26
|
+
};
|
|
27
|
+
export type RequestEncoder = (request: {
|
|
28
|
+
headers: NullableHeaders;
|
|
29
|
+
body: unknown;
|
|
30
|
+
}) => EncodedContent;
|
|
31
|
+
export declare const FallbackEncoder: RequestEncoder;
|
|
32
|
+
//# sourceMappingURL=request-options.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-options.d.mts","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE;OAEnB,KAAK,EAAE,QAAQ,EAAE;OACjB,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE;OACtC,EAAE,KAAK,WAAW,EAAE;AAE3B,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,KAAK,cAAc,CAAC;AAEtG,eAAO,MAAM,eAAe,EAAE,cAO7B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NullableHeaders } from
|
|
2
|
-
import type { BodyInit } from
|
|
3
|
-
import type { HTTPMethod, MergedRequestInit } from
|
|
4
|
-
import { type HeadersLike } from
|
|
1
|
+
import { NullableHeaders } from "./headers.js";
|
|
2
|
+
import type { BodyInit } from "./builtin-types.js";
|
|
3
|
+
import type { HTTPMethod, MergedRequestInit } from "./types.js";
|
|
4
|
+
import { type HeadersLike } from "./headers.js";
|
|
5
5
|
export type FinalRequestOptions = RequestOptions & {
|
|
6
6
|
method: HTTPMethod;
|
|
7
7
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-options.d.ts","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request-options.d.ts","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE;OAEnB,KAAK,EAAE,QAAQ,EAAE;OACjB,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE;OACtC,EAAE,KAAK,WAAW,EAAE;AAE3B,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,KAAK,cAAc,CAAC;AAEtG,eAAO,MAAM,eAAe,EAAE,cAO7B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Fetch } from "./builtin-types.mjs";
|
|
2
|
+
import { type ReadableStream } from "./shim-types.mjs";
|
|
3
|
+
export declare function getDefaultFetch(): Fetch;
|
|
4
|
+
type ReadableStreamArgs = ConstructorParameters<typeof ReadableStream>;
|
|
5
|
+
export declare function makeReadableStream(...args: ReadableStreamArgs): ReadableStream;
|
|
6
|
+
export declare function ReadableStreamFrom<T>(iterable: Iterable<T> | AsyncIterable<T>): ReadableStream<T>;
|
|
7
|
+
/**
|
|
8
|
+
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
9
|
+
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
10
|
+
*
|
|
11
|
+
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
12
|
+
*/
|
|
13
|
+
export declare function ReadableStreamToAsyncIterable<T>(stream: any): AsyncIterableIterator<T>;
|
|
14
|
+
/**
|
|
15
|
+
* Cancels a ReadableStream we don't need to consume.
|
|
16
|
+
* See https://undici.nodejs.org/#/?id=garbage-collection
|
|
17
|
+
*/
|
|
18
|
+
export declare function CancelReadableStream(stream: any): Promise<void>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=shims.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shims.d.mts","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"OASO,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,KAAK,cAAc,EAAE;AAE9B,wBAAgB,eAAe,IAAI,KAAK,CAQvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvE,wBAAgB,kBAAkB,CAAC,GAAG,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAW9E;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAkBjG;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAYrE"}
|
package/internal/shims.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* These are used to ensure we can provide a consistent behaviour between different JavaScript environments and good error
|
|
5
|
-
* messages in cases where an environment isn't fully supported.
|
|
6
|
-
*/
|
|
7
|
-
import { type Fetch } from './builtin-types';
|
|
8
|
-
import { type ReadableStream } from './shim-types';
|
|
1
|
+
import { type Fetch } from "./builtin-types.js";
|
|
2
|
+
import { type ReadableStream } from "./shim-types.js";
|
|
9
3
|
export declare function getDefaultFetch(): Fetch;
|
|
10
4
|
type ReadableStreamArgs = ConstructorParameters<typeof ReadableStream>;
|
|
11
5
|
export declare function makeReadableStream(...args: ReadableStreamArgs): ReadableStream;
|
package/internal/shims.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"OASO,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,KAAK,cAAc,EAAE;AAE9B,wBAAgB,eAAe,IAAI,KAAK,CAQvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvE,wBAAgB,kBAAkB,CAAC,GAAG,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAW9E;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAkBjG;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAYrE"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { FilePropertyBag } from "./builtin-types.mjs";
|
|
2
|
+
type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | DataView;
|
|
3
|
+
/**
|
|
4
|
+
* Intended to match DOM Blob, node-fetch Blob, node:buffer Blob, etc.
|
|
5
|
+
* Don't add arrayBuffer here, node-fetch doesn't have it
|
|
6
|
+
*/
|
|
7
|
+
interface BlobLike {
|
|
8
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
9
|
+
readonly size: number;
|
|
10
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
11
|
+
readonly type: string;
|
|
12
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
13
|
+
text(): Promise<string>;
|
|
14
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
15
|
+
slice(start?: number, end?: number): BlobLike;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Intended to match DOM File, node:buffer File, undici File, etc.
|
|
19
|
+
*/
|
|
20
|
+
interface FileLike extends BlobLike {
|
|
21
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
22
|
+
readonly lastModified: number;
|
|
23
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
24
|
+
readonly name?: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Intended to match DOM Response, node-fetch Response, undici Response, etc.
|
|
28
|
+
*/
|
|
29
|
+
export interface ResponseLike {
|
|
30
|
+
url: string;
|
|
31
|
+
blob(): Promise<BlobLike>;
|
|
32
|
+
}
|
|
33
|
+
export type ToFileInput = FileLike | ResponseLike | Exclude<BlobLikePart, string> | AsyncIterable<BlobLikePart>;
|
|
34
|
+
/**
|
|
35
|
+
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
36
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s
|
|
37
|
+
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
38
|
+
* @param {Object=} options additional properties
|
|
39
|
+
* @param {string=} options.type the MIME type of the content
|
|
40
|
+
* @param {number=} options.lastModified the last modified timestamp
|
|
41
|
+
* @returns a {@link File} with the given properties
|
|
42
|
+
*/
|
|
43
|
+
export declare function toFile(value: ToFileInput | PromiseLike<ToFileInput>, name?: string | null | undefined, options?: FilePropertyBag | undefined): Promise<File>;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=to-file.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-file.d.mts","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,eAAe,EAAE;AAG/B,KAAK,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjF;;;GAGG;AACH,UAAU,QAAQ;IAChB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,6EAA6E;IAC7E,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC/C;AAcD;;GAEG;AACH,UAAU,QAAS,SAAQ,QAAQ;IACjC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAYD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAQD,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAC7B,aAAa,CAAC,YAAY,CAAC,CAAC;AAEhC;;;;;;;;GAQG;AACH,wBAAsB,MAAM,CAC1B,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,EAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,GACpC,OAAO,CAAC,IAAI,CAAC,CAiCf"}
|
package/internal/to-file.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FilePropertyBag } from
|
|
1
|
+
import type { FilePropertyBag } from "./builtin-types.js";
|
|
2
2
|
type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | DataView;
|
|
3
3
|
/**
|
|
4
4
|
* Intended to match DOM Blob, node-fetch Blob, node:buffer Blob, etc.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-file.d.ts","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"to-file.d.ts","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,eAAe,EAAE;AAG/B,KAAK,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjF;;;GAGG;AACH,UAAU,QAAQ;IAChB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,6EAA6E;IAC7E,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC/C;AAcD;;GAEG;AACH,UAAU,QAAS,SAAQ,QAAQ;IACjC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAYD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAQD,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAC7B,aAAa,CAAC,YAAY,CAAC,CAAC;AAEhC;;;;;;;;GAQG;AACH,wBAAsB,MAAM,CAC1B,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,EAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,GACpC,OAAO,CAAC,IAAI,CAAC,CAiCf"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__setModuleDefault = exports.__createBinding = void 0;
|
|
4
|
+
exports.__classPrivateFieldSet = __classPrivateFieldSet;
|
|
5
|
+
exports.__classPrivateFieldGet = __classPrivateFieldGet;
|
|
6
|
+
exports.__importStar = __importStar;
|
|
7
|
+
exports.__exportStar = __exportStar;
|
|
8
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
9
|
+
if (kind === "m")
|
|
10
|
+
throw new TypeError("Private method is not writable");
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
+
return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value;
|
|
16
|
+
}
|
|
17
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
18
|
+
if (kind === "a" && !f)
|
|
19
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
20
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
21
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
22
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
23
|
+
}
|
|
24
|
+
var __createBinding = Object.create
|
|
25
|
+
? function (o, m, k, k2) {
|
|
26
|
+
if (k2 === void 0)
|
|
27
|
+
k2 = k;
|
|
28
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
29
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
30
|
+
desc = {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return m[k];
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(o, k2, desc);
|
|
38
|
+
}
|
|
39
|
+
: function (o, m, k, k2) {
|
|
40
|
+
if (k2 === void 0)
|
|
41
|
+
k2 = k;
|
|
42
|
+
o[k2] = m[k];
|
|
43
|
+
};
|
|
44
|
+
exports.__createBinding = __createBinding;
|
|
45
|
+
var __setModuleDefault = Object.create
|
|
46
|
+
? function (o, v) {
|
|
47
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
48
|
+
}
|
|
49
|
+
: function (o, v) {
|
|
50
|
+
o["default"] = v;
|
|
51
|
+
};
|
|
52
|
+
exports.__setModuleDefault = __setModuleDefault;
|
|
53
|
+
var ownKeys = function (o) {
|
|
54
|
+
ownKeys =
|
|
55
|
+
Object.getOwnPropertyNames ||
|
|
56
|
+
function (o2) {
|
|
57
|
+
var ar = [];
|
|
58
|
+
for (var k in o2)
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
60
|
+
ar[ar.length] = k;
|
|
61
|
+
return ar;
|
|
62
|
+
};
|
|
63
|
+
return ownKeys(o);
|
|
64
|
+
};
|
|
65
|
+
function __importStar(mod) {
|
|
66
|
+
if (mod && mod.__esModule)
|
|
67
|
+
return mod;
|
|
68
|
+
var result = {};
|
|
69
|
+
if (mod != null) {
|
|
70
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
71
|
+
if (k[i] !== "default")
|
|
72
|
+
__createBinding(result, mod, k[i]);
|
|
73
|
+
}
|
|
74
|
+
__setModuleDefault(result, mod);
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
function __exportStar(m, o) {
|
|
78
|
+
for (var p in m)
|
|
79
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
80
|
+
__createBinding(o, m, p);
|
|
81
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m")
|
|
3
|
+
throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f)
|
|
5
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
6
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
7
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8
|
+
return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value;
|
|
9
|
+
}
|
|
10
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
16
|
+
}
|
|
17
|
+
export { __classPrivateFieldSet, __classPrivateFieldGet };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export type PromiseOrValue<T> = T | Promise<T>;
|
|
2
|
+
export type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
3
|
+
export type KeysEnum<T> = {
|
|
4
|
+
[P in keyof Required<T>]: true;
|
|
5
|
+
};
|
|
6
|
+
export type FinalizedRequestInit = RequestInit & {
|
|
7
|
+
headers: Headers;
|
|
8
|
+
};
|
|
9
|
+
type NotAny<T> = [unknown] extends [T] ? never : T;
|
|
10
|
+
/**
|
|
11
|
+
* Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
|
|
12
|
+
*/
|
|
13
|
+
type OverloadedParameters<T> = T extends ({
|
|
14
|
+
(...args: infer A): unknown;
|
|
15
|
+
(...args: infer B): unknown;
|
|
16
|
+
(...args: infer C): unknown;
|
|
17
|
+
(...args: infer D): unknown;
|
|
18
|
+
}) ? A | B | C | D : T extends ({
|
|
19
|
+
(...args: infer A): unknown;
|
|
20
|
+
(...args: infer B): unknown;
|
|
21
|
+
(...args: infer C): unknown;
|
|
22
|
+
}) ? A | B | C : T extends ({
|
|
23
|
+
(...args: infer A): unknown;
|
|
24
|
+
(...args: infer B): unknown;
|
|
25
|
+
}) ? A | B : T extends (...args: infer A) => unknown ? A : never;
|
|
26
|
+
/**
|
|
27
|
+
* These imports attempt to get types from a parent package's dependencies.
|
|
28
|
+
* Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
|
|
29
|
+
* would cause typescript to show types not present at runtime. To avoid this, we import
|
|
30
|
+
* directly from parent node_modules folders.
|
|
31
|
+
*
|
|
32
|
+
* We need to check multiple levels because we don't know what directory structure we'll be in.
|
|
33
|
+
* For example, pnpm generates directories like this:
|
|
34
|
+
* ```
|
|
35
|
+
* node_modules
|
|
36
|
+
* ├── .pnpm
|
|
37
|
+
* │ └── pkg@1.0.0
|
|
38
|
+
* │ └── node_modules
|
|
39
|
+
* │ └── pkg
|
|
40
|
+
* │ └── internal
|
|
41
|
+
* │ └── types.d.ts
|
|
42
|
+
* ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg
|
|
43
|
+
* └── undici
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
|
|
47
|
+
*/
|
|
48
|
+
/** @ts-ignore For users with \@types/node */
|
|
49
|
+
type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types').RequestInit> | NotAny<import('../../node_modules/undici-types').RequestInit> | NotAny<import('../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types').RequestInit>;
|
|
50
|
+
/** @ts-ignore For users with undici */
|
|
51
|
+
type UndiciRequestInit = NotAny<import('../node_modules/undici').RequestInit> | NotAny<import('../../node_modules/undici').RequestInit> | NotAny<import('../../../node_modules/undici').RequestInit> | NotAny<import('../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici').RequestInit>;
|
|
52
|
+
/** @ts-ignore For users with \@types/bun */
|
|
53
|
+
type BunRequestInit = globalThis.FetchRequestInit;
|
|
54
|
+
/** @ts-ignore For users with node-fetch */
|
|
55
|
+
type NodeFetchRequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
|
|
56
|
+
/** @ts-ignore For users who use Deno */
|
|
57
|
+
type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
|
|
58
|
+
type RequestInits = NotAny<UndiciTypesRequestInit> | NotAny<UndiciRequestInit> | NotAny<BunRequestInit> | NotAny<NodeFetchRequestInit> | NotAny<RequestInit> | NotAny<FetchRequestInit>;
|
|
59
|
+
/**
|
|
60
|
+
* This type contains `RequestInit` options that may be available on the current runtime,
|
|
61
|
+
* including per-platform extensions like `dispatcher`, `agent`, `client`, etc.
|
|
62
|
+
*/
|
|
63
|
+
export type MergedRequestInit = RequestInits &
|
|
64
|
+
/** We don't include these in the types as they'll be overridden for every request. */
|
|
65
|
+
Partial<Record<'body' | 'headers' | 'method' | 'signal', never>>;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,O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B,GAAG,MAAM,CAAC,OAAO,4BAA4B,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,+BAA+B,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,kCAAkC,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,qCAAqC,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,wCAAwC,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,2CAA2C,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,8CAA8C,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,iDAAiD,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,oDAAoD,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,uDAAuD,EAAE,WAAW,CAAC,CAAC;AAC/uB,wCAAwC;AACxC,KAAK,gBAAgB,GAAG,WAAW,CAAC,oBAAoB,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAG3E,KAAK,YAAY,GACb,MAAM,CAAC,sBAAsB,CAAC,GAC9B,MAAM,CAAC,iBAAiB,CAAC,GACzB,MAAM,CAAC,cAAc,CAAC,GACtB,MAAM,CAAC,oBAAoB,CAAC,GAC5B,MAAM,CAAC,WAAW,CAAC,GACnB,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE7B;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY;AAC1C,sFAAsF;AACtF,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type RequestOptions } from "./request-options.mjs";
|
|
2
|
+
import type { FilePropertyBag, Fetch } from "./builtin-types.mjs";
|
|
3
|
+
import type { Papr } from "../client.mjs";
|
|
4
|
+
export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView;
|
|
5
|
+
type FsReadStream = AsyncIterable<Uint8Array> & {
|
|
6
|
+
path: string | {
|
|
7
|
+
toString(): string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
interface BunFile extends Blob {
|
|
11
|
+
readonly name?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const checkFileSupport: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Typically, this is a native "File" class.
|
|
16
|
+
*
|
|
17
|
+
* We provide the {@link toFile} utility to convert a variety of objects
|
|
18
|
+
* into the File class.
|
|
19
|
+
*
|
|
20
|
+
* For convenience, you can also pass a fetch Response, or in Node,
|
|
21
|
+
* the result of fs.createReadStream().
|
|
22
|
+
*/
|
|
23
|
+
export type Uploadable = File | Response | FsReadStream | BunFile;
|
|
24
|
+
/**
|
|
25
|
+
* Construct a `File` instance. This is used to ensure a helpful error is thrown
|
|
26
|
+
* for environments that don't define a global `File` yet.
|
|
27
|
+
*/
|
|
28
|
+
export declare function makeFile(fileBits: BlobPart[], fileName: string | undefined, options?: FilePropertyBag): File;
|
|
29
|
+
export declare function getName(value: any): string | undefined;
|
|
30
|
+
export declare const isAsyncIterable: (value: any) => value is AsyncIterable<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
|
|
33
|
+
* Otherwise returns the request as is.
|
|
34
|
+
*/
|
|
35
|
+
export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: Papr | Fetch) => Promise<RequestOptions>;
|
|
36
|
+
type MultipartFormRequestOptions = Omit<RequestOptions, 'body'> & {
|
|
37
|
+
body: unknown;
|
|
38
|
+
};
|
|
39
|
+
export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: Papr | Fetch) => Promise<RequestOptions>;
|
|
40
|
+
export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: Papr | Fetch) => Promise<FormData>;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=uploads.d.mts.map
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C;AAEpF,eAAO,MAAM,2BAA2B,GACtC,MAAM,2BAA2B,EACjC,OAAO,IAAI,GAAG,KAAK,KAClB,OAAO,CAAC,cAAc,CAExB,CAAC;AAkCF,eAAO,MAAM,UAAU,GAAU,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,MAAM,CAAC,GAAG,SAAS,EACnB,OAAO,IAAI,GAAG,KAAK,KAClB,OAAO,CAAC,QAAQ,CASlB,CAAC"}
|
package/internal/uploads.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type RequestOptions } from
|
|
2
|
-
import type { FilePropertyBag, Fetch } from
|
|
3
|
-
import type { Papr } from
|
|
1
|
+
import { type RequestOptions } from "./request-options.js";
|
|
2
|
+
import type { FilePropertyBag, Fetch } from "./builtin-types.js";
|
|
3
|
+
import type { Papr } from "../client.js";
|
|
4
4
|
export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView;
|
|
5
5
|
type FsReadStream = AsyncIterable<Uint8Array> & {
|
|
6
6
|
path: string | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,cAAc,EAAE;OACvB,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;OAC/B,KAAK,EAAE,IAAI,EAAE;AAGpB,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,IAAI,GAAG,QAAQ,CAAC;AAChF,KAAK,YAAY,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG;QAAE,QAAQ,IAAI,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAG1F,UAAU,OAAQ,SAAQ,IAAI;IAC5B,QAAQ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,MAgBvE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAgBxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bytes.d.mts","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAa7D;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,+BAMrC;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,UAM3C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read an environment variable.
|
|
3
|
+
*
|
|
4
|
+
* Trims beginning and trailing whitespace.
|
|
5
|
+
*
|
|
6
|
+
* Will return undefined if the environment variable doesn't exist or cannot be accessed.
|
|
7
|
+
*/
|
|
8
|
+
export declare const readEnv: (env: string) => string | undefined;
|
|
9
|
+
//# sourceMappingURL=env.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.mts","sourceRoot":"","sources":["../../src/internal/utils/env.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAQ9C,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type Papr } from "../../client.mjs";
|
|
2
|
+
import { RequestOptions } from "../request-options.mjs";
|
|
3
|
+
type LogFn = (message: string, ...rest: unknown[]) => void;
|
|
4
|
+
export type Logger = {
|
|
5
|
+
error: LogFn;
|
|
6
|
+
warn: LogFn;
|
|
7
|
+
info: LogFn;
|
|
8
|
+
debug: LogFn;
|
|
9
|
+
};
|
|
10
|
+
export type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug';
|
|
11
|
+
export declare const parseLogLevel: (maybeLevel: string | undefined, sourceName: string, client: Papr) => LogLevel | undefined;
|
|
12
|
+
export declare function loggerFor(client: Papr): Logger;
|
|
13
|
+
export declare const formatRequestDetails: (details: {
|
|
14
|
+
options?: RequestOptions | undefined;
|
|
15
|
+
headers?: Headers | Record<string, string> | undefined;
|
|
16
|
+
retryOfRequestLogID?: string | undefined;
|
|
17
|
+
retryOf?: string | undefined;
|
|
18
|
+
url?: string | undefined;
|
|
19
|
+
status?: number | undefined;
|
|
20
|
+
method?: string | undefined;
|
|
21
|
+
durationMs?: number | undefined;
|
|
22
|
+
message?: unknown;
|
|
23
|
+
body?: unknown;
|
|
24
|
+
}) => {
|
|
25
|
+
options?: RequestOptions | undefined;
|
|
26
|
+
headers?: Headers | Record<string, string> | undefined;
|
|
27
|
+
retryOfRequestLogID?: string | undefined;
|
|
28
|
+
retryOf?: string | undefined;
|
|
29
|
+
url?: string | undefined;
|
|
30
|
+
status?: number | undefined;
|
|
31
|
+
method?: string | undefined;
|
|
32
|
+
durationMs?: number | undefined;
|
|
33
|
+
message?: unknown;
|
|
34
|
+
body?: unknown;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=log.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.mts","sourceRoot":"","sources":["../../src/internal/utils/log.ts"],"names":[],"mappings":"OAGO,EAAE,KAAK,IAAI,EAAE;OACb,EAAE,cAAc,EAAE;AAEzB,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAC3D,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAUnE,eAAO,MAAM,aAAa,GACxB,YAAY,MAAM,GAAG,SAAS,EAC9B,YAAY,MAAM,EAClB,QAAQ,IAAI,KACX,QAAQ,GAAG,SAab,CAAC;AAsBF,wBAAgB,SAAS,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAsB9C;AAED,eAAO,MAAM,oBAAoB,GAAI,SAAS;IAC5C,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACvD,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;cAVW,cAAc,GAAG,SAAS;cAC1B,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;0BAChC,MAAM,GAAG,SAAS;cAC9B,MAAM,GAAG,SAAS;UACtB,MAAM,GAAG,SAAS;aACf,MAAM,GAAG,SAAS;aAClB,MAAM,GAAG,SAAS;iBACd,MAAM,GAAG,SAAS;cACrB,OAAO;WACV,OAAO;CA8Bf,CAAC"}
|
package/internal/utils/log.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Papr } from
|
|
2
|
-
import { RequestOptions } from
|
|
1
|
+
import { type Papr } from "../../client.js";
|
|
2
|
+
import { RequestOptions } from "../request-options.js";
|
|
3
3
|
type LogFn = (message: string, ...rest: unknown[]) => void;
|
|
4
4
|
export type Logger = {
|
|
5
5
|
error: LogFn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/internal/utils/log.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/internal/utils/log.ts"],"names":[],"mappings":"OAGO,EAAE,KAAK,IAAI,EAAE;OACb,EAAE,cAAc,EAAE;AAEzB,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAC3D,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAUnE,eAAO,MAAM,aAAa,GACxB,YAAY,MAAM,GAAG,SAAS,EAC9B,YAAY,MAAM,EAClB,QAAQ,IAAI,KACX,QAAQ,GAAG,SAab,CAAC;AAsBF,wBAAgB,SAAS,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAsB9C;AAED,eAAO,MAAM,oBAAoB,GAAI,SAAS;IAC5C,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACvD,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;cAVW,cAAc,GAAG,SAAS;cAC1B,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;0BAChC,MAAM,GAAG,SAAS;cAC9B,MAAM,GAAG,SAAS;UACtB,MAAM,GAAG,SAAS;aACf,MAAM,GAAG,SAAS;aAClB,MAAM,GAAG,SAAS;iBACd,MAAM,GAAG,SAAS;cACrB,OAAO;WACV,OAAO;CA8Bf,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Percent-encode everything that isn't safe to have in a path without encoding safe chars.
|
|
3
|
+
*
|
|
4
|
+
* Taken from https://datatracker.ietf.org/doc/html/rfc3986#section-3.3:
|
|
5
|
+
* > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
|
6
|
+
* > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
|
|
7
|
+
* > pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
|
|
8
|
+
*/
|
|
9
|
+
export declare function encodeURIPath(str: string): string;
|
|
10
|
+
export declare const createPathTagFunction: (pathEncoder?: typeof encodeURIPath) => (statics: readonly string[], ...params: readonly unknown[]) => string;
|
|
11
|
+
/**
|
|
12
|
+
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
|
13
|
+
*/
|
|
14
|
+
export declare const path: (statics: readonly string[], ...params: readonly unknown[]) => string;
|
|
15
|
+
//# sourceMappingURL=path.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.mts","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,UAExC;AAED,eAAO,MAAM,qBAAqB,GAAI,kCAA2B,MACjD,SAAS,SAAS,MAAM,EAAE,EAAE,GAAG,QAAQ,SAAS,OAAO,EAAE,KAAG,MA0CzE,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,IAAI,YA/CQ,SAAS,MAAM,EAAE,aAAa,SAAS,OAAO,EAAE,KAAG,MA+CpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sleep.d.mts","sourceRoot":"","sources":["../../src/internal/utils/sleep.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,kBAA4D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.d.mts","sourceRoot":"","sources":["../../src/internal/utils/uuid.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,IAAI,KAAK,WAWf,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const isAbsoluteURL: (url: string) => boolean;
|
|
2
|
+
/** Returns an object if the given value isn't an object, otherwise returns as-is */
|
|
3
|
+
export declare function maybeObj(x: unknown): object;
|
|
4
|
+
export declare function isEmptyObj(obj: Object | null | undefined): boolean;
|
|
5
|
+
export declare function hasOwn<T extends object = object>(obj: T, key: PropertyKey): key is keyof T;
|
|
6
|
+
export declare function isObj(obj: unknown): obj is Record<string, unknown>;
|
|
7
|
+
export declare const ensurePresent: <T>(value: T | null | undefined) => T;
|
|
8
|
+
export declare const validatePositiveInteger: (name: string, n: unknown) => number;
|
|
9
|
+
export declare const coerceInteger: (value: unknown) => number;
|
|
10
|
+
export declare const coerceFloat: (value: unknown) => number;
|
|
11
|
+
export declare const coerceBoolean: (value: unknown) => boolean;
|
|
12
|
+
export declare const maybeCoerceInteger: (value: unknown) => number | undefined;
|
|
13
|
+
export declare const maybeCoerceFloat: (value: unknown) => number | undefined;
|
|
14
|
+
export declare const maybeCoerceBoolean: (value: unknown) => boolean | undefined;
|
|
15
|
+
export declare const safeJSON: (text: string)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,GAAI,MAAM,MAAM,QAMpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":""}
|
package/internal/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export * from "./utils/values.js";
|
|
2
|
+
export * from "./utils/base64.js";
|
|
3
|
+
export * from "./utils/env.js";
|
|
4
|
+
export * from "./utils/log.js";
|
|
5
|
+
export * from "./utils/uuid.js";
|
|
6
|
+
export * from "./utils/sleep.js";
|
|
7
7
|
//# sourceMappingURL=utils.d.ts.map
|
package/internal/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":""}
|