UNPKG

@interopio/desktop-cli

Version:

CLI tool for setting up, building and packaging io.Connect Desktop projects

110 lines 2.98 kB
import { ComponentsStore } from './store'; import { Component } from '../component'; /** * S3 Components Store implementation * * This store downloads components from an AWS S3 bucket. * It expects components to be organized in the bucket with the following structure: * * bucket/ * ├── component1/ * │ ├── v1.0.0/ * │ │ ├── component1-v1.0.0-win32.zip * │ │ ├── component1-v1.0.0-darwin.dmg * │ │ └── component1-v1.0.0-darwin-arm64.dmg * │ └── v1.1.0/ * │ ├── component1-v1.1.0-win32.zip * │ └── component1-v1.1.0-darwin.dmg * └── component2/ * └── v2.0.0/ * └── component2-v2.0.0-win32.zip * * Authentication is handled through AWS credentials (environment variables, IAM roles, etc.) */ export declare class S3ComponentsStore implements ComponentsStore { private logger; private bucketName; private region; private prefix; private accessKeyId; private secretAccessKey; constructor(config: { bucketName: string; region: string; prefix?: string; accessKeyId?: string; secretAccessKey?: string; }); getInfo(): string; getAll(): Promise<Component[]>; download(name: string, version: string): Promise<{ name: string; data: any; filename: string; }>; /** * Validate the S3 configuration */ private validateConfiguration; /** * List all objects in the S3 bucket */ private listAllObjects; /** * List objects in S3 bucket using ListObjectsV2 API */ private listObjectsV2; /** * Download an object from S3 */ private downloadObject; /** * Find the S3 object key for a specific component and version */ private findComponentObject; /** * Parse S3 objects into Component array */ private parseS3ObjectsToComponents; /** * Parse component information from S3 object key */ private parseComponentFromKey; /** * Extract platform information from filename */ private extractPlatformFromFilename; /** * Check if a key matches the current platform */ private matchesPlatform; /** * Get current platform string */ private getCurrentPlatform; /** * Extract version from S3 object key */ private extractVersionFromKey; /** * Compare two version strings for sorting */ private compareVersions; /** * Extract filename from S3 object key */ private extractFilenameFromKey; /** * Build S3 API URL for a given object key */ private buildS3ApiUrl; /** * Create AWS Signature Version 4 authentication headers */ private createAuthHeaders; /** * Parse S3 ListObjects XML response */ private parseListObjectsResponse; } //# sourceMappingURL=s3.store.d.ts.map