@mixedbread/sdk 0.3.0 → 0.4.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 +15 -0
- package/README.md +108 -35
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/{_shims/auto/runtime.js → api-promise.js} +3 -5
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +236 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +236 -0
- package/client.d.ts.map +1 -0
- package/client.js +527 -0
- package/client.js.map +1 -0
- package/client.mjs +500 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +47 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +47 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +84 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +80 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +47 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +47 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +67 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +67 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +120 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +114 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +16 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -169
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -168
- package/index.d.ts.map +1 -1
- package/index.js +14 -157
- package/index.js.map +1 -1
- package/index.mjs +6 -130
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +75 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +75 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +21 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +21 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +77 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +72 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +13 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +13 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +36 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +33 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +33 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +28 -0
- package/internal/shim-types.d.ts +28 -0
- package/internal/shims/crypto.d.mts +13 -0
- package/internal/shims/crypto.d.mts.map +1 -0
- package/internal/shims/crypto.d.ts +13 -0
- package/internal/shims/crypto.d.ts.map +1 -0
- package/internal/shims/crypto.js +13 -0
- package/internal/shims/crypto.js.map +1 -0
- package/internal/shims/crypto.mjs +9 -0
- package/internal/shims/crypto.mjs.map +1 -0
- package/internal/shims/file.d.mts +23 -0
- package/internal/shims/file.d.mts.map +1 -0
- package/internal/shims/file.d.ts +23 -0
- package/internal/shims/file.d.ts.map +1 -0
- package/internal/shims/file.js +16 -0
- package/internal/shims/file.js.map +1 -0
- package/internal/shims/file.mjs +12 -0
- package/internal/shims/file.mjs.map +1 -0
- package/internal/shims/getBuiltinModule.d.mts +11 -0
- package/internal/shims/getBuiltinModule.d.mts.map +1 -0
- package/internal/shims/getBuiltinModule.d.ts +11 -0
- package/internal/shims/getBuiltinModule.d.ts.map +1 -0
- package/internal/shims/getBuiltinModule.js +68 -0
- package/internal/shims/getBuiltinModule.js.map +1 -0
- package/internal/shims/getBuiltinModule.mjs +64 -0
- package/internal/shims/getBuiltinModule.mjs.map +1 -0
- package/internal/shims/nullGetBuiltinModule.d.mts +2 -0
- package/internal/shims/nullGetBuiltinModule.d.mts.map +1 -0
- package/internal/shims/nullGetBuiltinModule.d.ts +2 -0
- package/internal/shims/nullGetBuiltinModule.d.ts.map +1 -0
- package/internal/shims/nullGetBuiltinModule.js +5 -0
- package/internal/shims/nullGetBuiltinModule.js.map +1 -0
- package/internal/shims/nullGetBuiltinModule.mjs +2 -0
- package/internal/shims/nullGetBuiltinModule.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +93 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +46 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +46 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +87 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/types.d.mts +68 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +68 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +44 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +44 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +131 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +122 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +33 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +28 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +38 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +38 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +58 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +53 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +20 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +16 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +16 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +16 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +109 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +92 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/{_shims/auto/runtime-bun.js → internal/utils.js} +8 -5
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/lib/polling.d.mts +48 -0
- package/lib/polling.d.mts.map +1 -0
- package/lib/polling.d.ts.map +1 -1
- package/lib/polling.js +0 -1
- package/lib/polling.js.map +1 -1
- package/lib/polling.mjs +0 -1
- package/lib/polling.mjs.map +1 -1
- package/package.json +126 -63
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +1 -29
- package/pagination.d.ts.map +1 -1
- package/pagination.js +16 -42
- package/pagination.js.map +1 -1
- package/pagination.mjs +1 -40
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +16 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/embeddings.d.mts +46 -0
- package/resources/embeddings.d.mts.map +1 -0
- package/resources/embeddings.d.ts +4 -3
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js +1 -1
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs +1 -1
- package/resources/embeddings.mjs.map +1 -1
- package/resources/extractions/content.d.mts +34 -0
- package/resources/extractions/content.d.mts.map +1 -0
- package/resources/extractions/content.d.ts +4 -3
- package/resources/extractions/content.d.ts.map +1 -1
- package/resources/extractions/content.js +1 -1
- package/resources/extractions/content.js.map +1 -1
- package/resources/extractions/content.mjs +1 -1
- package/resources/extractions/content.mjs.map +1 -1
- package/resources/extractions/extractions.d.mts +18 -0
- package/resources/extractions/extractions.d.mts.map +1 -0
- package/resources/extractions/extractions.d.ts +1 -1
- package/resources/extractions/extractions.d.ts.map +1 -1
- package/resources/extractions/extractions.js +1 -1
- package/resources/extractions/extractions.js.map +1 -1
- package/resources/extractions/extractions.mjs +1 -1
- package/resources/extractions/index.d.mts +5 -0
- package/resources/extractions/index.d.mts.map +1 -0
- package/resources/extractions/index.d.ts.map +1 -1
- package/resources/extractions/jobs.d.mts +85 -0
- package/resources/extractions/jobs.d.mts.map +1 -0
- package/resources/extractions/jobs.d.ts +5 -4
- package/resources/extractions/jobs.d.ts.map +1 -1
- package/resources/extractions/jobs.js +4 -3
- package/resources/extractions/jobs.js.map +1 -1
- package/resources/extractions/jobs.mjs +4 -3
- package/resources/extractions/jobs.mjs.map +1 -1
- package/resources/extractions/schema.d.mts +86 -0
- package/resources/extractions/schema.d.mts.map +1 -0
- package/resources/extractions/schema.d.ts +6 -5
- package/resources/extractions/schema.d.ts.map +1 -1
- package/resources/extractions/schema.js +1 -1
- package/resources/extractions/schema.js.map +1 -1
- package/resources/extractions/schema.mjs +1 -1
- package/resources/extractions/schema.mjs.map +1 -1
- package/resources/extractions.d.mts +2 -0
- package/resources/extractions.d.mts.map +1 -0
- package/resources/extractions.d.ts.map +1 -1
- package/resources/files.d.mts +125 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +16 -16
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +24 -46
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +23 -21
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +8 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/parsing/index.d.mts +3 -0
- package/resources/parsing/index.d.mts.map +1 -0
- package/resources/parsing/index.d.ts +1 -1
- package/resources/parsing/index.d.ts.map +1 -1
- package/resources/parsing/index.js +1 -2
- package/resources/parsing/index.js.map +1 -1
- package/resources/parsing/index.mjs +1 -1
- package/resources/parsing/index.mjs.map +1 -1
- package/resources/parsing/jobs.d.mts +289 -0
- package/resources/parsing/jobs.d.mts.map +1 -0
- package/resources/parsing/jobs.d.ts +16 -17
- package/resources/parsing/jobs.d.ts.map +1 -1
- package/resources/parsing/jobs.js +18 -18
- package/resources/parsing/jobs.js.map +1 -1
- package/resources/parsing/jobs.mjs +17 -16
- package/resources/parsing/jobs.mjs.map +1 -1
- package/resources/parsing/parsing.d.mts +10 -0
- package/resources/parsing/parsing.d.mts.map +1 -0
- package/resources/parsing/parsing.d.ts +2 -2
- package/resources/parsing/parsing.d.ts.map +1 -1
- package/resources/parsing/parsing.js +1 -2
- package/resources/parsing/parsing.js.map +1 -1
- package/resources/parsing/parsing.mjs +2 -3
- package/resources/parsing/parsing.mjs.map +1 -1
- package/resources/parsing.d.mts +2 -0
- package/resources/parsing.d.mts.map +1 -0
- package/resources/parsing.d.ts.map +1 -1
- package/resources/shared.d.mts +49 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/top-level.d.mts +184 -0
- package/resources/top-level.d.mts.map +1 -0
- package/resources/top-level.d.ts.map +1 -1
- package/resources/vector-stores/files.d.mts +303 -0
- package/resources/vector-stores/files.d.mts.map +1 -0
- package/resources/vector-stores/files.d.ts +27 -16
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +23 -23
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +22 -21
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/index.d.mts +3 -0
- package/resources/vector-stores/index.d.mts.map +1 -0
- package/resources/vector-stores/index.d.ts +2 -2
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/index.js +1 -3
- package/resources/vector-stores/index.js.map +1 -1
- package/resources/vector-stores/index.mjs +2 -2
- package/resources/vector-stores/index.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.mts +428 -0
- package/resources/vector-stores/vector-stores.d.mts.map +1 -0
- package/resources/vector-stores/vector-stores.d.ts +15 -16
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +18 -19
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +18 -18
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/resources/vector-stores.d.mts +2 -0
- package/resources/vector-stores.d.mts.map +1 -0
- package/resources/vector-stores.d.ts.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +860 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +183 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +6 -330
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +96 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/request-options.ts +37 -0
- package/src/internal/shim-types.d.ts +28 -0
- package/src/internal/shims/crypto.ts +18 -0
- package/src/internal/shims/file.ts +32 -0
- package/src/internal/shims/getBuiltinModule.ts +64 -0
- package/src/internal/shims/nullGetBuiltinModule.ts +1 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +152 -0
- package/src/internal/types.ts +92 -0
- package/src/internal/uploads.ts +175 -0
- package/src/internal/utils/base64.ts +37 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +65 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +19 -0
- package/src/internal/utils/values.ts +102 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/polling.ts +0 -1
- package/src/pagination.ts +2 -82
- package/src/resource.ts +2 -11
- package/src/resources/embeddings.ts +5 -4
- package/src/resources/extractions/content.ts +4 -3
- package/src/resources/extractions/extractions.ts +1 -1
- package/src/resources/extractions/jobs.ts +7 -5
- package/src/resources/extractions/schema.ts +6 -5
- package/src/resources/files.ts +30 -34
- package/src/resources/index.ts +2 -2
- package/src/resources/parsing/index.ts +1 -1
- package/src/resources/parsing/jobs.ts +23 -32
- package/src/resources/parsing/parsing.ts +2 -3
- package/src/resources/vector-stores/files.ts +51 -49
- package/src/resources/vector-stores/index.ts +4 -2
- package/src/resources/vector-stores/vector-stores.ts +27 -38
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +16 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -252
- package/core.d.ts.map +0 -1
- package/core.js +0 -917
- package/core.js.map +0 -1
- package/core.mjs +0 -885
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1227
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
import { NullableHeaders } from "./headers.js";
|
3
|
+
import type { BodyInit } from "./builtin-types.js";
|
4
|
+
import type { HTTPMethod, MergedRequestInit } from "./types.js";
|
5
|
+
import { type HeadersLike } from "./headers.js";
|
6
|
+
export type FinalRequestOptions = RequestOptions & {
|
7
|
+
method: HTTPMethod;
|
8
|
+
path: string;
|
9
|
+
};
|
10
|
+
export type RequestOptions = {
|
11
|
+
method?: HTTPMethod;
|
12
|
+
path?: string;
|
13
|
+
query?: object | undefined | null;
|
14
|
+
body?: unknown;
|
15
|
+
headers?: HeadersLike;
|
16
|
+
maxRetries?: number;
|
17
|
+
stream?: boolean | undefined;
|
18
|
+
timeout?: number;
|
19
|
+
fetchOptions?: MergedRequestInit;
|
20
|
+
signal?: AbortSignal | undefined | null;
|
21
|
+
idempotencyKey?: string;
|
22
|
+
__binaryResponse?: boolean | undefined;
|
23
|
+
};
|
24
|
+
export type EncodedContent = {
|
25
|
+
bodyHeaders: HeadersLike;
|
26
|
+
body: BodyInit;
|
27
|
+
};
|
28
|
+
export type RequestEncoder = (request: {
|
29
|
+
headers: NullableHeaders;
|
30
|
+
body: unknown;
|
31
|
+
}) => EncodedContent;
|
32
|
+
export declare const FallbackEncoder: RequestEncoder;
|
33
|
+
//# sourceMappingURL=request-options.d.ts.map
|
@@ -0,0 +1 @@
|
|
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,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.FallbackEncoder = void 0;
|
5
|
+
const FallbackEncoder = ({ headers, body }) => {
|
6
|
+
return {
|
7
|
+
bodyHeaders: {
|
8
|
+
'content-type': 'application/json',
|
9
|
+
},
|
10
|
+
body: JSON.stringify(body),
|
11
|
+
};
|
12
|
+
};
|
13
|
+
exports.FallbackEncoder = FallbackEncoder;
|
14
|
+
//# sourceMappingURL=request-options.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"request-options.js","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AA6B/E,MAAM,eAAe,GAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACnE,OAAO;QACL,WAAW,EAAE;YACX,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
export const FallbackEncoder = ({ headers, body }) => {
|
3
|
+
return {
|
4
|
+
bodyHeaders: {
|
5
|
+
'content-type': 'application/json',
|
6
|
+
},
|
7
|
+
body: JSON.stringify(body),
|
8
|
+
};
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=request-options.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"request-options.mjs","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"AAAA,sFAAsF;AA6BtF,MAAM,CAAC,MAAM,eAAe,GAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACnE,OAAO;QACL,WAAW,EAAE;YACX,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC,CAAC"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Shims for types that we can't always rely on being available globally.
|
5
|
+
*
|
6
|
+
* Note: these only exist at the type-level, there is no corresponding runtime
|
7
|
+
* version for any of these symbols.
|
8
|
+
*/
|
9
|
+
|
10
|
+
/**
|
11
|
+
* In order to properly access the global `NodeJS` type, if it's available, we
|
12
|
+
* need to make use of declaration shadowing. Without this, any checks for the
|
13
|
+
* presence of `NodeJS.ReadableStream` will fail.
|
14
|
+
*/
|
15
|
+
declare namespace NodeJS {
|
16
|
+
interface ReadableStream {}
|
17
|
+
}
|
18
|
+
|
19
|
+
type HasProperties<T> = keyof T extends never ? false : true;
|
20
|
+
|
21
|
+
// @ts-ignore
|
22
|
+
type _ReadableStream<R = any> =
|
23
|
+
// @ts-ignore
|
24
|
+
HasProperties<NodeJS.ReadableStream> extends true ? NodeJS.ReadableStream<R> : ReadableStream<R>;
|
25
|
+
|
26
|
+
// @ts-ignore
|
27
|
+
declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream;
|
28
|
+
export { _ReadableStream as ReadableStream };
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Shims for types that we can't always rely on being available globally.
|
5
|
+
*
|
6
|
+
* Note: these only exist at the type-level, there is no corresponding runtime
|
7
|
+
* version for any of these symbols.
|
8
|
+
*/
|
9
|
+
|
10
|
+
/**
|
11
|
+
* In order to properly access the global `NodeJS` type, if it's available, we
|
12
|
+
* need to make use of declaration shadowing. Without this, any checks for the
|
13
|
+
* presence of `NodeJS.ReadableStream` will fail.
|
14
|
+
*/
|
15
|
+
declare namespace NodeJS {
|
16
|
+
interface ReadableStream {}
|
17
|
+
}
|
18
|
+
|
19
|
+
type HasProperties<T> = keyof T extends never ? false : true;
|
20
|
+
|
21
|
+
// @ts-ignore
|
22
|
+
type _ReadableStream<R = any> =
|
23
|
+
// @ts-ignore
|
24
|
+
HasProperties<NodeJS.ReadableStream> extends true ? NodeJS.ReadableStream<R> : ReadableStream<R>;
|
25
|
+
|
26
|
+
// @ts-ignore
|
27
|
+
declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream;
|
28
|
+
export { _ReadableStream as ReadableStream };
|
@@ -0,0 +1,13 @@
|
|
1
|
+
type Crypto = {
|
2
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
3
|
+
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
|
4
|
+
/**
|
5
|
+
* Available only in secure contexts.
|
6
|
+
*
|
7
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
8
|
+
*/
|
9
|
+
randomUUID?: () => string;
|
10
|
+
};
|
11
|
+
export declare let getCrypto: () => Crypto | undefined;
|
12
|
+
export {};
|
13
|
+
//# sourceMappingURL=crypto.d.mts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"crypto.d.mts","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"AAEA,KAAK,MAAM,GAAG;IACZ,yFAAyF;IACzF,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IAC/D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,IAAI,SAAS,EAAE,MAAM,MAAM,GAAG,SAKpC,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
type Crypto = {
|
2
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
3
|
+
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
|
4
|
+
/**
|
5
|
+
* Available only in secure contexts.
|
6
|
+
*
|
7
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
8
|
+
*/
|
9
|
+
randomUUID?: () => string;
|
10
|
+
};
|
11
|
+
export declare let getCrypto: () => Crypto | undefined;
|
12
|
+
export {};
|
13
|
+
//# sourceMappingURL=crypto.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"AAEA,KAAK,MAAM,GAAG;IACZ,yFAAyF;IACzF,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IAC/D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,IAAI,SAAS,EAAE,MAAM,MAAM,GAAG,SAKpC,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getCrypto = void 0;
|
4
|
+
const getBuiltinModule_1 = require("./getBuiltinModule.js");
|
5
|
+
let getCrypto = function lazyGetCrypto() {
|
6
|
+
if (exports.getCrypto !== lazyGetCrypto)
|
7
|
+
return (0, exports.getCrypto)();
|
8
|
+
const crypto = globalThis.crypto || (0, getBuiltinModule_1.getBuiltinModule)?.('node:crypto')?.webcrypto;
|
9
|
+
exports.getCrypto = () => crypto;
|
10
|
+
return crypto;
|
11
|
+
};
|
12
|
+
exports.getCrypto = getCrypto;
|
13
|
+
//# sourceMappingURL=crypto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":";;;AAAA,4DAAsD;AAY/C,IAAI,SAAS,GAA6B,SAAS,aAAa;IACrE,IAAI,iBAAS,KAAK,aAAa;QAAE,OAAO,IAAA,iBAAS,GAAE,CAAC;IACpD,MAAM,MAAM,GAAY,UAAkB,CAAC,MAAM,IAAK,IAAA,mCAAgB,CAAA,EAAE,CAAC,aAAa,CAAS,EAAE,SAAS,CAAC;IAC3G,iBAAS,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AALS,QAAA,SAAS,aAKlB"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { getBuiltinModule } from "./getBuiltinModule.mjs";
|
2
|
+
export let getCrypto = function lazyGetCrypto() {
|
3
|
+
if (getCrypto !== lazyGetCrypto)
|
4
|
+
return getCrypto();
|
5
|
+
const crypto = globalThis.crypto || getBuiltinModule?.('node:crypto')?.webcrypto;
|
6
|
+
getCrypto = () => crypto;
|
7
|
+
return crypto;
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=crypto.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"crypto.mjs","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"OAAO,EAAE,gBAAgB,EAAE;AAY3B,MAAM,CAAC,IAAI,SAAS,GAA6B,SAAS,aAAa;IACrE,IAAI,SAAS,KAAK,aAAa;QAAE,OAAO,SAAS,EAAE,CAAC;IACpD,MAAM,MAAM,GAAY,UAAkB,CAAC,MAAM,IAAK,gBAAgB,EAAE,CAAC,aAAa,CAAS,EAAE,SAAS,CAAC;IAC3G,SAAS,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
export declare let getFile: () => FileConstructor;
|
3
|
+
type FileConstructor = typeof globalThis extends {
|
4
|
+
File: infer fileConstructor;
|
5
|
+
} ? fileConstructor : typeof FallbackFile;
|
6
|
+
export type File = InstanceType<FileConstructor>;
|
7
|
+
type FallbackBlobSource = ConstructorParameters<typeof Blob>[0] extends infer T ? T : never;
|
8
|
+
/**
|
9
|
+
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
10
|
+
*/
|
11
|
+
declare class FallbackFile extends Blob {
|
12
|
+
constructor(sources: FallbackBlobSource, fileName: string, options?: any);
|
13
|
+
/**
|
14
|
+
* The name of the `File`.
|
15
|
+
*/
|
16
|
+
readonly name: string;
|
17
|
+
/**
|
18
|
+
* The last modified date of the `File`.
|
19
|
+
*/
|
20
|
+
readonly lastModified: number;
|
21
|
+
}
|
22
|
+
export {};
|
23
|
+
//# sourceMappingURL=file.d.mts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"file.d.mts","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":";AAEA,eAAO,IAAI,OAAO,QAA2B,eAO5C,CAAC;AAEF,KAAK,eAAe,GAClB,OAAO,UAAU,SAAS;IAAE,IAAI,EAAE,MAAM,eAAe,CAAA;CAAE,GAAG,eAAe,GAAG,OAAO,YAAY,CAAC;AACpG,MAAM,MAAM,IAAI,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAIjD,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC5F;;GAEG;AACH,OAAO,OAAO,YAAa,SAAQ,IAAI;gBACzB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IACxE;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
export declare let getFile: () => FileConstructor;
|
3
|
+
type FileConstructor = typeof globalThis extends {
|
4
|
+
File: infer fileConstructor;
|
5
|
+
} ? fileConstructor : typeof FallbackFile;
|
6
|
+
export type File = InstanceType<FileConstructor>;
|
7
|
+
type FallbackBlobSource = ConstructorParameters<typeof Blob>[0] extends infer T ? T : never;
|
8
|
+
/**
|
9
|
+
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
10
|
+
*/
|
11
|
+
declare class FallbackFile extends Blob {
|
12
|
+
constructor(sources: FallbackBlobSource, fileName: string, options?: any);
|
13
|
+
/**
|
14
|
+
* The name of the `File`.
|
15
|
+
*/
|
16
|
+
readonly name: string;
|
17
|
+
/**
|
18
|
+
* The last modified date of the `File`.
|
19
|
+
*/
|
20
|
+
readonly lastModified: number;
|
21
|
+
}
|
22
|
+
export {};
|
23
|
+
//# sourceMappingURL=file.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":";AAEA,eAAO,IAAI,OAAO,QAA2B,eAO5C,CAAC;AAEF,KAAK,eAAe,GAClB,OAAO,UAAU,SAAS;IAAE,IAAI,EAAE,MAAM,eAAe,CAAA;CAAE,GAAG,eAAe,GAAG,OAAO,YAAY,CAAC;AACpG,MAAM,MAAM,IAAI,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAIjD,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC5F;;GAEG;AACH,OAAO,OAAO,YAAa,SAAQ,IAAI;gBACzB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IACxE;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getFile = void 0;
|
4
|
+
const getBuiltinModule_1 = require("./getBuiltinModule.js");
|
5
|
+
let getFile = function lazyGetFile() {
|
6
|
+
if (exports.getFile !== lazyGetFile)
|
7
|
+
return (0, exports.getFile)();
|
8
|
+
// We can drop getBuiltinModule once we no longer support Node < 20.0.0
|
9
|
+
const File = globalThis.File ?? (0, getBuiltinModule_1.getBuiltinModule)?.('node:buffer')?.File;
|
10
|
+
if (!File)
|
11
|
+
throw new Error('`File` is not defined as a global, which is required for file uploads.');
|
12
|
+
exports.getFile = () => File;
|
13
|
+
return File;
|
14
|
+
};
|
15
|
+
exports.getFile = getFile;
|
16
|
+
//# sourceMappingURL=file.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":";;;AAAA,4DAAsD;AAE/C,IAAI,OAAO,GAAG,SAAS,WAAW;IACvC,IAAI,eAAO,KAAK,WAAW;QAAE,OAAO,IAAA,eAAO,GAAE,CAAC;IAC9C,uEAAuE;IACvE,MAAM,IAAI,GAAI,UAAkB,CAAC,IAAI,IAAK,IAAA,mCAAgB,CAAA,EAAE,CAAC,aAAa,CAAS,EAAE,IAAI,CAAC;IAC1F,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IACrG,eAAO,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAPS,QAAA,OAAO,WAOhB"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { getBuiltinModule } from "./getBuiltinModule.mjs";
|
2
|
+
export let getFile = function lazyGetFile() {
|
3
|
+
if (getFile !== lazyGetFile)
|
4
|
+
return getFile();
|
5
|
+
// We can drop getBuiltinModule once we no longer support Node < 20.0.0
|
6
|
+
const File = globalThis.File ?? getBuiltinModule?.('node:buffer')?.File;
|
7
|
+
if (!File)
|
8
|
+
throw new Error('`File` is not defined as a global, which is required for file uploads.');
|
9
|
+
getFile = () => File;
|
10
|
+
return File;
|
11
|
+
};
|
12
|
+
//# sourceMappingURL=file.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"file.mjs","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":"OAAO,EAAE,gBAAgB,EAAE;AAE3B,MAAM,CAAC,IAAI,OAAO,GAAG,SAAS,WAAW;IACvC,IAAI,OAAO,KAAK,WAAW;QAAE,OAAO,OAAO,EAAE,CAAC;IAC9C,uEAAuE;IACvE,MAAM,IAAI,GAAI,UAAkB,CAAC,IAAI,IAAK,gBAAgB,EAAE,CAAC,aAAa,CAAS,EAAE,IAAI,CAAC;IAC1F,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IACrG,OAAO,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* Load a Node built-in module. ID may or may not be prefixed by `node:` and
|
3
|
+
* will be normalized. If we used static imports then our bundle size would be bloated by
|
4
|
+
* injected polyfills, and if we used dynamic require then in addition to bundlers logging warnings,
|
5
|
+
* our code would not work when bundled to ESM and run in Node 18.
|
6
|
+
* @param {string} id ID of the built-in to be loaded.
|
7
|
+
* @returns {object|undefined} exports of the built-in. Undefined if the built-in
|
8
|
+
* does not exist.
|
9
|
+
*/
|
10
|
+
export declare let getBuiltinModule: null | ((id: string) => object | undefined);
|
11
|
+
//# sourceMappingURL=getBuiltinModule.d.mts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getBuiltinModule.d.mts","sourceRoot":"","sources":["../../src/internal/shims/getBuiltinModule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,IAAI,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAsDtE,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* Load a Node built-in module. ID may or may not be prefixed by `node:` and
|
3
|
+
* will be normalized. If we used static imports then our bundle size would be bloated by
|
4
|
+
* injected polyfills, and if we used dynamic require then in addition to bundlers logging warnings,
|
5
|
+
* our code would not work when bundled to ESM and run in Node 18.
|
6
|
+
* @param {string} id ID of the built-in to be loaded.
|
7
|
+
* @returns {object|undefined} exports of the built-in. Undefined if the built-in
|
8
|
+
* does not exist.
|
9
|
+
*/
|
10
|
+
export declare let getBuiltinModule: null | ((id: string) => object | undefined);
|
11
|
+
//# sourceMappingURL=getBuiltinModule.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getBuiltinModule.d.ts","sourceRoot":"","sources":["../../src/internal/shims/getBuiltinModule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,IAAI,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAsDtE,CAAC"}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getBuiltinModule = void 0;
|
4
|
+
/**
|
5
|
+
* Load a Node built-in module. ID may or may not be prefixed by `node:` and
|
6
|
+
* will be normalized. If we used static imports then our bundle size would be bloated by
|
7
|
+
* injected polyfills, and if we used dynamic require then in addition to bundlers logging warnings,
|
8
|
+
* our code would not work when bundled to ESM and run in Node 18.
|
9
|
+
* @param {string} id ID of the built-in to be loaded.
|
10
|
+
* @returns {object|undefined} exports of the built-in. Undefined if the built-in
|
11
|
+
* does not exist.
|
12
|
+
*/
|
13
|
+
let getBuiltinModule = function getBuiltinModuleLazy(id) {
|
14
|
+
try {
|
15
|
+
if (exports.getBuiltinModule !== getBuiltinModuleLazy)
|
16
|
+
return exports.getBuiltinModule(id);
|
17
|
+
if (process.getBuiltinModule) {
|
18
|
+
exports.getBuiltinModule = process.getBuiltinModule;
|
19
|
+
}
|
20
|
+
else {
|
21
|
+
/* Fallback implementation for Node 18 */
|
22
|
+
function createFallbackGetBuiltinModule(BuiltinModule) {
|
23
|
+
return function getBuiltinModule(id) {
|
24
|
+
id = BuiltinModule.normalizeRequirableId(String(id));
|
25
|
+
if (!BuiltinModule.canBeRequiredByUsers(id)) {
|
26
|
+
return;
|
27
|
+
}
|
28
|
+
const mod = BuiltinModule.map.get(id);
|
29
|
+
mod.compileForPublicLoader();
|
30
|
+
return mod.exports;
|
31
|
+
};
|
32
|
+
}
|
33
|
+
const magicKey = Math.random() + '';
|
34
|
+
let module;
|
35
|
+
try {
|
36
|
+
const kClone = Object.getOwnPropertySymbols(Blob.prototype).find((e) => e.description?.includes('clone'));
|
37
|
+
Object.defineProperty(Object.prototype, magicKey, {
|
38
|
+
get() {
|
39
|
+
module = this;
|
40
|
+
throw null;
|
41
|
+
},
|
42
|
+
configurable: true,
|
43
|
+
});
|
44
|
+
structuredClone(new (class extends Blob {
|
45
|
+
[kClone]() {
|
46
|
+
return {
|
47
|
+
deserializeInfo: 'internal/bootstrap/realm:' + magicKey,
|
48
|
+
};
|
49
|
+
}
|
50
|
+
})([]));
|
51
|
+
}
|
52
|
+
catch { }
|
53
|
+
delete Object.prototype[magicKey];
|
54
|
+
if (module) {
|
55
|
+
exports.getBuiltinModule = createFallbackGetBuiltinModule(module.BuiltinModule);
|
56
|
+
}
|
57
|
+
else {
|
58
|
+
exports.getBuiltinModule = () => undefined;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
return exports.getBuiltinModule(id);
|
62
|
+
}
|
63
|
+
catch {
|
64
|
+
return undefined;
|
65
|
+
}
|
66
|
+
};
|
67
|
+
exports.getBuiltinModule = getBuiltinModule;
|
68
|
+
//# sourceMappingURL=getBuiltinModule.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getBuiltinModule.js","sourceRoot":"","sources":["../../src/internal/shims/getBuiltinModule.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACI,IAAI,gBAAgB,GAAgD,SAAS,oBAAoB,CACtG,EAAU;IAEV,IAAI;QACF,IAAI,wBAAgB,KAAK,oBAAoB;YAAE,OAAO,wBAAiB,CAAC,EAAE,CAAC,CAAC;QAC5E,IAAK,OAAe,CAAC,gBAAgB,EAAE;YACrC,wBAAgB,GAAI,OAAe,CAAC,gBAAgB,CAAC;SACtD;aAAM;YACL,yCAAyC;YACzC,SAAS,8BAA8B,CAAC,aAAkB;gBACxD,OAAO,SAAS,gBAAgB,CAAC,EAAU;oBACzC,EAAE,GAAG,aAAa,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;oBACrD,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE;wBAC3C,OAAO;qBACR;oBACD,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBACtC,GAAG,CAAC,sBAAsB,EAAE,CAAC;oBAC7B,OAAO,GAAG,CAAC,OAAO,CAAC;gBACrB,CAAC,CAAC;YACJ,CAAC;YACD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;YACpC,IAAI,MAA0C,CAAC;YAC/C,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAC9D,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,CACvC,CAAC;gBACH,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE;oBAChD,GAAG;wBACD,MAAM,GAAG,IAAI,CAAC;wBACd,MAAM,IAAI,CAAC;oBACb,CAAC;oBACD,YAAY,EAAE,IAAI;iBACnB,CAAC,CAAC;gBACH,eAAe,CACb,IAAI,CAAC,KAAM,SAAQ,IAAI;oBACrB,CAAC,MAAM,CAAC;wBACN,OAAO;4BACL,eAAe,EAAE,2BAA2B,GAAG,QAAQ;yBACxD,CAAC;oBACJ,CAAC;iBACF,CAAC,CAAC,EAAE,CAAC,CACP,CAAC;aACH;YAAC,MAAM,GAAE;YACV,OAAQ,MAAM,CAAC,SAAiB,CAAC,QAAQ,CAAC,CAAC;YAC3C,IAAI,MAAM,EAAE;gBACV,wBAAgB,GAAG,8BAA8B,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;aACzE;iBAAM;gBACL,wBAAgB,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;aACpC;SACF;QACD,OAAO,wBAAiB,CAAC,EAAE,CAAC,CAAC;KAC9B;IAAC,MAAM;QACN,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAC;AAtDS,QAAA,gBAAgB,oBAsDzB"}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
/**
|
2
|
+
* Load a Node built-in module. ID may or may not be prefixed by `node:` and
|
3
|
+
* will be normalized. If we used static imports then our bundle size would be bloated by
|
4
|
+
* injected polyfills, and if we used dynamic require then in addition to bundlers logging warnings,
|
5
|
+
* our code would not work when bundled to ESM and run in Node 18.
|
6
|
+
* @param {string} id ID of the built-in to be loaded.
|
7
|
+
* @returns {object|undefined} exports of the built-in. Undefined if the built-in
|
8
|
+
* does not exist.
|
9
|
+
*/
|
10
|
+
export let getBuiltinModule = function getBuiltinModuleLazy(id) {
|
11
|
+
try {
|
12
|
+
if (getBuiltinModule !== getBuiltinModuleLazy)
|
13
|
+
return getBuiltinModule(id);
|
14
|
+
if (process.getBuiltinModule) {
|
15
|
+
getBuiltinModule = process.getBuiltinModule;
|
16
|
+
}
|
17
|
+
else {
|
18
|
+
/* Fallback implementation for Node 18 */
|
19
|
+
function createFallbackGetBuiltinModule(BuiltinModule) {
|
20
|
+
return function getBuiltinModule(id) {
|
21
|
+
id = BuiltinModule.normalizeRequirableId(String(id));
|
22
|
+
if (!BuiltinModule.canBeRequiredByUsers(id)) {
|
23
|
+
return;
|
24
|
+
}
|
25
|
+
const mod = BuiltinModule.map.get(id);
|
26
|
+
mod.compileForPublicLoader();
|
27
|
+
return mod.exports;
|
28
|
+
};
|
29
|
+
}
|
30
|
+
const magicKey = Math.random() + '';
|
31
|
+
let module;
|
32
|
+
try {
|
33
|
+
const kClone = Object.getOwnPropertySymbols(Blob.prototype).find((e) => e.description?.includes('clone'));
|
34
|
+
Object.defineProperty(Object.prototype, magicKey, {
|
35
|
+
get() {
|
36
|
+
module = this;
|
37
|
+
throw null;
|
38
|
+
},
|
39
|
+
configurable: true,
|
40
|
+
});
|
41
|
+
structuredClone(new (class extends Blob {
|
42
|
+
[kClone]() {
|
43
|
+
return {
|
44
|
+
deserializeInfo: 'internal/bootstrap/realm:' + magicKey,
|
45
|
+
};
|
46
|
+
}
|
47
|
+
})([]));
|
48
|
+
}
|
49
|
+
catch { }
|
50
|
+
delete Object.prototype[magicKey];
|
51
|
+
if (module) {
|
52
|
+
getBuiltinModule = createFallbackGetBuiltinModule(module.BuiltinModule);
|
53
|
+
}
|
54
|
+
else {
|
55
|
+
getBuiltinModule = () => undefined;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
return getBuiltinModule(id);
|
59
|
+
}
|
60
|
+
catch {
|
61
|
+
return undefined;
|
62
|
+
}
|
63
|
+
};
|
64
|
+
//# sourceMappingURL=getBuiltinModule.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getBuiltinModule.mjs","sourceRoot":"","sources":["../../src/internal/shims/getBuiltinModule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,IAAI,gBAAgB,GAAgD,SAAS,oBAAoB,CACtG,EAAU;IAEV,IAAI;QACF,IAAI,gBAAgB,KAAK,oBAAoB;YAAE,OAAO,gBAAiB,CAAC,EAAE,CAAC,CAAC;QAC5E,IAAK,OAAe,CAAC,gBAAgB,EAAE;YACrC,gBAAgB,GAAI,OAAe,CAAC,gBAAgB,CAAC;SACtD;aAAM;YACL,yCAAyC;YACzC,SAAS,8BAA8B,CAAC,aAAkB;gBACxD,OAAO,SAAS,gBAAgB,CAAC,EAAU;oBACzC,EAAE,GAAG,aAAa,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;oBACrD,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE;wBAC3C,OAAO;qBACR;oBACD,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBACtC,GAAG,CAAC,sBAAsB,EAAE,CAAC;oBAC7B,OAAO,GAAG,CAAC,OAAO,CAAC;gBACrB,CAAC,CAAC;YACJ,CAAC;YACD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;YACpC,IAAI,MAA0C,CAAC;YAC/C,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAC9D,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,CACvC,CAAC;gBACH,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE;oBAChD,GAAG;wBACD,MAAM,GAAG,IAAI,CAAC;wBACd,MAAM,IAAI,CAAC;oBACb,CAAC;oBACD,YAAY,EAAE,IAAI;iBACnB,CAAC,CAAC;gBACH,eAAe,CACb,IAAI,CAAC,KAAM,SAAQ,IAAI;oBACrB,CAAC,MAAM,CAAC;wBACN,OAAO;4BACL,eAAe,EAAE,2BAA2B,GAAG,QAAQ;yBACxD,CAAC;oBACJ,CAAC;iBACF,CAAC,CAAC,EAAE,CAAC,CACP,CAAC;aACH;YAAC,MAAM,GAAE;YACV,OAAQ,MAAM,CAAC,SAAiB,CAAC,QAAQ,CAAC,CAAC;YAC3C,IAAI,MAAM,EAAE;gBACV,gBAAgB,GAAG,8BAA8B,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;aACzE;iBAAM;gBACL,gBAAgB,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;aACpC;SACF;QACD,OAAO,gBAAiB,CAAC,EAAE,CAAC,CAAC;KAC9B;IAAC,MAAM;QACN,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nullGetBuiltinModule.d.mts","sourceRoot":"","sources":["../../src/internal/shims/nullGetBuiltinModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,MAAO,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nullGetBuiltinModule.d.ts","sourceRoot":"","sources":["../../src/internal/shims/nullGetBuiltinModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,MAAO,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nullGetBuiltinModule.js","sourceRoot":"","sources":["../../src/internal/shims/nullGetBuiltinModule.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,IAAI,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nullGetBuiltinModule.mjs","sourceRoot":"","sources":["../../src/internal/shims/nullGetBuiltinModule.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,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"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { type Fetch } from "./builtin-types.js";
|
2
|
+
import { type ReadableStream } from "./shim-types.js";
|
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.ts.map
|
@@ -0,0 +1 @@
|
|
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"}
|