@idetik/core 0.20.1 → 0.20.3

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.
@@ -1,60 +0,0 @@
1
- import { FetchStore } from "zarrita";
2
- type AwsCredentials = {
3
- accessKeyId: string;
4
- secretAccessKey: string;
5
- sessionToken?: string;
6
- };
7
- export type S3FetchStoreProps = {
8
- url: string;
9
- region?: string;
10
- credentials?: AwsCredentials;
11
- overrides?: RequestInit;
12
- useSuffixRequest?: boolean;
13
- };
14
- /**
15
- * A FetchStore that generates AWS Signature V4 headers for each request.
16
- * This is necessary because AWS signatures are path-specific and expire quickly.
17
- *
18
- * SECURITY WARNING: This class is only intended for local development.
19
- * Credentials are passed to worker threads and stored in memory.
20
- * Do not use in production - implement a secure backend proxy instead.
21
- */
22
- export declare class S3FetchStore extends FetchStore {
23
- readonly credentials?: AwsCredentials;
24
- readonly region?: string;
25
- private signingKeyCache_;
26
- readonly overrides?: RequestInit;
27
- readonly useSuffixRequest?: boolean;
28
- constructor(props: S3FetchStoreProps);
29
- /**
30
- * Override get() to generate fresh auth headers for each request
31
- */
32
- get(key: `/${string}`, options?: RequestInit): Promise<Uint8Array | undefined>;
33
- /**
34
- * Override getRange() to generate fresh auth headers for range requests
35
- * This handles HEAD requests made by fetch_suffix
36
- */
37
- getRange(key: `/${string}`, range: {
38
- offset: number;
39
- length: number;
40
- } | {
41
- suffixLength: number;
42
- }, options?: RequestInit): Promise<Uint8Array | undefined>;
43
- /**
44
- * Generate AWS Signature V4 headers for a specific URL and HTTP method
45
- * This uses the Web Crypto API for browser compatibility
46
- */
47
- private generateAuthHeaders;
48
- private getAmzDate;
49
- private sha256;
50
- private hmacSha256;
51
- private hmacSha256Bytes;
52
- /**
53
- * Get the signing key for a given date/region combination.
54
- * Caches the key to avoid regenerating it for every request (key is valid for 24 hours).
55
- */
56
- private getSignatureKey;
57
- private bufferToHex;
58
- }
59
- export {};
60
- //# sourceMappingURL=s3_fetch_store.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