Comparing version 7.1.3 to 7.1.4
@@ -79,4 +79,5 @@ /// <reference lib="es2022.error" /> | ||
code?: string; | ||
region?: string; | ||
} | ||
export declare class IsValidBucketNameError extends ExtendableError {} | ||
export {}; |
@@ -138,2 +138,2 @@ "use strict"; | ||
exports.IsValidBucketNameError = IsValidBucketNameError; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJFeHRlbmRhYmxlRXJyb3IiLCJFcnJvciIsImNvbnN0cnVjdG9yIiwibWVzc2FnZSIsIm9wdCIsIm5hbWUiLCJBbm9ueW1vdXNSZXF1ZXN0RXJyb3IiLCJleHBvcnRzIiwiSW52YWxpZEFyZ3VtZW50RXJyb3IiLCJJbnZhbGlkUG9ydEVycm9yIiwiSW52YWxpZEVuZHBvaW50RXJyb3IiLCJJbnZhbGlkQnVja2V0TmFtZUVycm9yIiwiSW52YWxpZE9iamVjdE5hbWVFcnJvciIsIkFjY2Vzc0tleVJlcXVpcmVkRXJyb3IiLCJTZWNyZXRLZXlSZXF1aXJlZEVycm9yIiwiRXhwaXJlc1BhcmFtRXJyb3IiLCJJbnZhbGlkRGF0ZUVycm9yIiwiSW52YWxpZFByZWZpeEVycm9yIiwiSW52YWxpZEJ1Y2tldFBvbGljeUVycm9yIiwiSW5jb3JyZWN0U2l6ZUVycm9yIiwiSW52YWxpZFhNTEVycm9yIiwiUzNFcnJvciIsIklzVmFsaWRCdWNrZXROYW1lRXJyb3IiXSwic291cmNlcyI6WyJlcnJvcnMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIE1pbklPIEphdmFzY3JpcHQgTGlicmFyeSBmb3IgQW1hem9uIFMzIENvbXBhdGlibGUgQ2xvdWQgU3RvcmFnZSwgKEMpIDIwMTUgTWluSU8sIEluYy5cbiAqXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNl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sa0JBQUE7QUFHTyxNQUFNQyx3QkFBd0IsU0FBU2xCLGVBQWUsQ0FBQzs7QUFFOUQ7QUFDQTtBQUNBO0FBQ0E7QUFIQU8sT0FBQSxDQUFBVyx3QkFBQSxHQUFBQSx3QkFBQTtBQUlPLE1BQU1DLGtCQUFrQixTQUFTbkIsZUFBZSxDQUFDOztBQUV4RDtBQUNBO0FBQ0E7QUFGQU8sT0FBQSxDQUFBWSxrQkFBQSxHQUFBQSxrQkFBQTtBQUdPLE1BQU1DLGVBQWUsU0FBU3BCLGVBQWUsQ0FBQzs7QUFFckQ7QUFDQTtBQUNBO0FBQ0E7QUFIQU8sT0FBQSxDQUFBYSxlQUFBLEdBQUFBLGVBQUE7QUFJTyxNQUFNQyxPQUFPLFNBQVNyQixlQUFlLENBQUM7QUFHNUNPLE9BQUEsQ0FBQWMsT0FBQSxHQUFBQSxPQUFBO0FBRU0sTUFBTUMsc0JBQXNCLFNBQVN0QixlQUFlLENBQUM7QUFBRU8sT0FBQSxDQUFBZSxzQkFBQSxHQUFBQSxzQkFBQSJ9 |
@@ -7,8 +7,10 @@ /// <reference types="node" /> | ||
import * as https from 'node:https'; | ||
import type * as stream from 'node:stream'; | ||
import * as stream from 'node:stream'; | ||
import { CredentialProvider } from "../CredentialProvider.js"; | ||
import type { SelectResults } from "../helpers.js"; | ||
import { LEGAL_HOLD_STATUS } from "../helpers.js"; | ||
import { Extensions } from "./extensions.js"; | ||
import type { Region } from "./s3-endpoints.js"; | ||
import type { Binary, BucketItemFromList, BucketItemStat, IRequest, ReplicationConfig, ReplicationConfigOpts, RequestHeaders, ResultCallback, StatObjectOpts, Transport } from "./type.js"; | ||
import type { UploadedPart } from "./xml-parser.js"; | ||
import type { Binary, BucketItemFromList, BucketItemStat, BucketStream, BucketVersioningConfiguration, EncryptionConfig, GetObjectLegalHoldOptions, IncompleteUploadedBucketItem, IRequest, ItemBucketMetadata, LifecycleConfig, LifeCycleConfigParam, ObjectLockInfo, ObjectMetaData, PutObjectLegalHoldOptions, ReplicationConfig, ReplicationConfigOpts, RequestHeaders, ResultCallback, Retention, SelectOptions, StatObjectOpts, Tag, TaggingOpts, Tags, Transport, UploadedObjectInfo, VersionIdentificator } from "./type.js"; | ||
import type { ListMultipartResult, UploadedPart } from "./xml-parser.js"; | ||
declare const requestOptionProperties: readonly ["agent", "ca", "cert", "ciphers", "clientCertEngine", "crl", "dhparam", "ecdhCurve", "family", "honorCipherOrder", "key", "passphrase", "pfx", "rejectUnauthorized", "secureOptions", "secureProtocol", "servername", "sessionIdContext"]; | ||
@@ -38,2 +40,5 @@ export interface ClientOptions { | ||
export type NoResultCallback = (error: unknown) => void; | ||
export interface MakeBucketOpt { | ||
ObjectLocking?: boolean; | ||
} | ||
export interface RemoveOptions { | ||
@@ -163,2 +168,11 @@ versionId?: string; | ||
getBucketRegion(bucketName: string, cb: (err: unknown, region: string) => void): Promise<void>; | ||
/** | ||
* Creates the bucket `bucketName`. | ||
* | ||
*/ | ||
makeBucket(bucketName: string, region?: Region, makeOpts?: MakeBucketOpt): Promise<void>; | ||
/** | ||
* To check if a bucket already exists. | ||
*/ | ||
bucketExists(bucketName: string): Promise<boolean>; | ||
removeBucket(bucketName: string): Promise<void>; | ||
@@ -170,2 +184,25 @@ /** | ||
/** | ||
* Callback is called with readable stream of the object content. | ||
*/ | ||
getObject(bucketName: string, objectName: string, getOpts?: VersionIdentificator): Promise<stream.Readable>; | ||
/** | ||
* Callback is called with readable stream of the partial object content. | ||
* @param bucketName | ||
* @param objectName | ||
* @param offset | ||
* @param length - length of the object that will be read in the stream (optional, if not specified we read the rest of the file from the offset) | ||
* @param getOpts | ||
*/ | ||
getPartialObject(bucketName: string, objectName: string, offset: number, length?: number, getOpts?: VersionIdentificator): Promise<stream.Readable>; | ||
/** | ||
* download object content to a file. | ||
* This method will create a temp file named `${filename}.${etag}.part.minio` when downloading. | ||
* | ||
* @param bucketName - name of the bucket | ||
* @param objectName - name of the object | ||
* @param filePath - path to which the object data will be written to | ||
* @param getOpts - Optional object get option | ||
*/ | ||
fGetObject(bucketName: string, objectName: string, filePath: string, getOpts?: VersionIdentificator): Promise<void>; | ||
/** | ||
* Stat information of the object. | ||
@@ -184,3 +221,8 @@ */ | ||
removeObject(bucketName: string, objectName: string, removeOpts?: RemoveOptions): Promise<void>; | ||
listIncompleteUploads(bucket: string, prefix: string, recursive: boolean): BucketStream<IncompleteUploadedBucketItem>; | ||
/** | ||
* Called by listIncompleteUploads to fetch a batch of incomplete uploads. | ||
*/ | ||
listIncompleteUploadsQuery(bucketName: string, prefix: string, keyMarker: string, uploadIdMarker: string, delimiter: string): Promise<ListMultipartResult>; | ||
/** | ||
* Initiate a new multipart upload. | ||
@@ -198,3 +240,14 @@ * @internal | ||
abortMultipartUpload(bucketName: string, objectName: string, uploadId: string): Promise<void>; | ||
findUploadId(bucketName: string, objectName: string): Promise<string | undefined>; | ||
/** | ||
* this call will aggregate the parts on the server into a single object. | ||
*/ | ||
completeMultipartUpload(bucketName: string, objectName: string, uploadId: string, etags: { | ||
part: number; | ||
etag?: string; | ||
}[]): Promise<{ | ||
etag: string; | ||
versionId: string | null; | ||
}>; | ||
/** | ||
* Get part-info of all parts of an incomplete upload specified by uploadId. | ||
@@ -208,9 +261,72 @@ */ | ||
listBuckets(): Promise<BucketItemFromList[]>; | ||
/** | ||
* Calculate part size given the object size. Part size will be atleast this.partSize | ||
*/ | ||
calculatePartSize(size: number): number; | ||
/** | ||
* Uploads the object using contents from a file | ||
*/ | ||
fPutObject(bucketName: string, objectName: string, filePath: string, metaData?: ObjectMetaData): Promise<void>; | ||
/** | ||
* Uploading a stream, "Buffer" or "string". | ||
* It's recommended to pass `size` argument with stream. | ||
*/ | ||
putObject(bucketName: string, objectName: string, stream: stream.Readable | Buffer | string, size?: number, metaData?: ItemBucketMetadata): Promise<UploadedObjectInfo>; | ||
/** | ||
* method to upload buffer in one call | ||
* @private | ||
*/ | ||
private uploadBuffer; | ||
/** | ||
* upload stream with MultipartUpload | ||
* @private | ||
*/ | ||
private uploadStream; | ||
removeBucketReplication(bucketName: string): Promise<void>; | ||
removeBucketReplication(bucketName: string, callback: NoResultCallback): void; | ||
setBucketReplication(bucketName: string, replicationConfig: ReplicationConfigOpts, callback: NoResultCallback): void; | ||
setBucketReplication(bucketName: string, replicationConfig: ReplicationConfigOpts): void; | ||
setBucketReplication(bucketName: string, replicationConfig: ReplicationConfigOpts): Promise<void>; | ||
getBucketReplication(bucketName: string, callback: ResultCallback<ReplicationConfig>): void; | ||
getBucketReplication(bucketName: string): void; | ||
getBucketReplication(bucketName: string): Promise<ReplicationConfig>; | ||
getObjectLegalHold(bucketName: string, objectName: string, getOpts?: GetObjectLegalHoldOptions, callback?: ResultCallback<LEGAL_HOLD_STATUS>): Promise<LEGAL_HOLD_STATUS>; | ||
setObjectLegalHold(bucketName: string, objectName: string, setOpts?: PutObjectLegalHoldOptions): void; | ||
/** | ||
* Get Tags associated with a Bucket | ||
*/ | ||
getBucketTagging(bucketName: string): Promise<Tag[]>; | ||
/** | ||
* Get the tags associated with a bucket OR an object | ||
*/ | ||
getObjectTagging(bucketName: string, objectName: string, getOpts?: VersionIdentificator): Promise<Tag[]>; | ||
/** | ||
* Set the policy on a bucket or an object prefix. | ||
*/ | ||
setBucketPolicy(bucketName: string, policy: string): Promise<void>; | ||
/** | ||
* Get the policy on a bucket or an object prefix. | ||
*/ | ||
getBucketPolicy(bucketName: string): Promise<string>; | ||
putObjectRetention(bucketName: string, objectName: string, retentionOpts?: Retention): Promise<void>; | ||
getObjectLockConfig(bucketName: string, callback: ResultCallback<ObjectLockInfo>): void; | ||
getObjectLockConfig(bucketName: string): void; | ||
getObjectLockConfig(bucketName: string): Promise<ObjectLockInfo>; | ||
setObjectLockConfig(bucketName: string, lockConfigOpts: Omit<ObjectLockInfo, 'objectLockEnabled'>): void; | ||
setObjectLockConfig(bucketName: string, lockConfigOpts: Omit<ObjectLockInfo, 'objectLockEnabled'>): Promise<void>; | ||
getBucketVersioning(bucketName: string): Promise<void>; | ||
setBucketVersioning(bucketName: string, versionConfig: BucketVersioningConfiguration): Promise<void>; | ||
private setTagging; | ||
private removeTagging; | ||
setBucketTagging(bucketName: string, tags: Tag): Promise<void>; | ||
removeBucketTagging(bucketName: string): Promise<void>; | ||
setObjectTagging(bucketName: string, objectName: string, tags: Tags, putOpts: TaggingOpts): Promise<void>; | ||
removeObjectTagging(bucketName: string, objectName: string, removeOpts: TaggingOpts): Promise<void>; | ||
selectObjectContent(bucketName: string, objectName: string, selectOpts: SelectOptions): Promise<SelectResults | undefined>; | ||
private applyBucketLifecycle; | ||
removeBucketLifecycle(bucketName: string): Promise<void>; | ||
setBucketLifecycle(bucketName: string, lifeCycleConfig: LifeCycleConfigParam): Promise<void>; | ||
getBucketLifecycle(bucketName: string): Promise<LifecycleConfig | null>; | ||
setBucketEncryption(bucketName: string, encryptionConfig?: EncryptionConfig): Promise<void>; | ||
getBucketEncryption(bucketName: string): Promise<any>; | ||
removeBucketEncryption(bucketName: string): Promise<void>; | ||
} | ||
export {}; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import * as stream from 'node:stream'; | ||
import _ from 'lodash'; | ||
import type { Binary, Encryption, ObjectMetaData, RequestHeaders, ResponseHeader } from "./type.js"; | ||
/** | ||
* All characters in string which are NOT unreserved should be percent encoded. | ||
* Unreserved characters are : ALPHA / DIGIT / "-" / "." / "_" / "~" | ||
* Reference https://tools.ietf.org/html/rfc3986#section-2.2 | ||
*/ | ||
export declare function uriEscape(string: string): string; | ||
export declare function hashBinary(buf: Buffer, enableSHA256: boolean): { | ||
md5sum: string; | ||
sha256sum: string; | ||
}; | ||
export declare function uriEscape(uriStr: string): string; | ||
export declare function uriResourceEscape(string: string): string; | ||
@@ -169,2 +169,6 @@ export declare function getScope(region: string, date: Date, serviceName?: string): string; | ||
} | null; | ||
export declare function parseXml(xml: string): any; | ||
export declare function parseXml(xml: string): any; | ||
/** | ||
* get content size of object content to upload | ||
*/ | ||
export declare function getContentLength(s: stream.Readable | Buffer | string): Promise<number | null>; |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.extractMetadata = extractMetadata; | ||
exports.getContentLength = getContentLength; | ||
exports.getEncryptionHeaders = getEncryptionHeaders; | ||
@@ -13,2 +14,3 @@ exports.getScope = getScope; | ||
exports.getVersionId = getVersionId; | ||
exports.hashBinary = hashBinary; | ||
exports.insertContentType = insertContentType; | ||
@@ -59,2 +61,3 @@ exports.isAmazonEndpoint = isAmazonEndpoint; | ||
var mime = _interopRequireWildcard(require("mime-types"), true); | ||
var _async = require("./async.js"); | ||
var _type = require("./type.js"); | ||
@@ -80,27 +83,18 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
const MetaDataHeaderPrefix = 'x-amz-meta-'; | ||
function hashBinary(buf, enableSHA256) { | ||
let sha256sum = ''; | ||
if (enableSHA256) { | ||
sha256sum = crypto.createHash('sha256').update(buf).digest('hex'); | ||
} | ||
const md5sum = crypto.createHash('md5').update(buf).digest('base64'); | ||
return { | ||
md5sum, | ||
sha256sum | ||
}; | ||
} | ||
/** | ||
* All characters in string which are NOT unreserved should be percent encoded. | ||
* Unreserved characters are : ALPHA / DIGIT / "-" / "." / "_" / "~" | ||
* Reference https://tools.ietf.org/html/rfc3986#section-2.2 | ||
*/ | ||
function uriEscape(string) { | ||
return string.split('').reduce((acc, elem) => { | ||
const buf = Buffer.from(elem); | ||
if (buf.length === 1) { | ||
// length 1 indicates that elem is not a unicode character. | ||
// Check if it is an unreserved characer. | ||
if ('A' <= elem && elem <= 'Z' || 'a' <= elem && elem <= 'z' || '0' <= elem && elem <= '9' || elem === '_' || elem === '.' || elem === '~' || elem === '-') { | ||
// Unreserved characer should not be encoded. | ||
acc = acc + elem; | ||
return acc; | ||
} | ||
} | ||
// elem needs encoding - i.e elem should be encoded if it's not unreserved | ||
// character or if it's a unicode character. | ||
for (const char of buf) { | ||
acc = acc + '%' + char.toString(16).toUpperCase(); | ||
} | ||
return acc; | ||
}, ''); | ||
// S3 percent-encodes some extra non-standard characters in a URI . So comply with S3. | ||
const encodeAsHex = c => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; | ||
function uriEscape(uriStr) { | ||
return encodeURIComponent(uriStr).replace(/[!'()*]/g, encodeAsHex); | ||
} | ||
@@ -168,5 +162,5 @@ function uriResourceEscape(string) { | ||
} | ||
const alphaNumerics = '`~!@#$%^&*()+={}[]|\\"\';:><?/'; | ||
const nonAlphaNumerics = '`~!@#$%^&*()+={}[]|\\"\';:><?/'; | ||
// All non alphanumeric characters are invalid. | ||
for (const char of alphaNumerics) { | ||
for (const char of nonAlphaNumerics) { | ||
if (host.includes(char)) { | ||
@@ -579,2 +573,27 @@ return false; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjcnlwdG8iLCJfaW50ZXJvcFJlcXVpcmVXaWxkY2FyZCIsInJlcXVpcmUiLCJzdHJlYW0iLCJfZmFzdFhtbFBhcnNlciIsIl9pcGFkZHIiLCJfbG9kYXNoIiwibWltZSIsIl90eXBlIiwiX2dldFJlcXVpcmVXaWxkY2FyZENhY2hlIiwibm9kZUludGVyb3AiLCJXZWFrTWFwIiwiY2FjaGVCYWJlbEludGVyb3AiLCJjYWNoZU5vZGVJbnRlcm9wIiwib2JqIiwiX19lc01vZHVsZSIsImRlZmF1bHQiLCJjYWNoZSIsImhhcyIsImdldCIsIm5ld09iaiIsImhhc1Byb3BlcnR5RGVzY3JpcHRvciIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yIiwia2V5IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJjYWxsIiwiZGVzYyIsInNldCIsIk1ldGFEYXRhSGVhZG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NyQkcsV0FBVyxFQUFFO0lBQ2Y7SUFFQSxNQUFNQyxZQUFZLEdBQUdILFNBQVM7SUFDOUIsTUFBTUksVUFBVSxHQUFHRCxZQUFZLEdBQUdELFdBQVcsR0FBRyxDQUFDO0lBQ2pERixTQUFTLEdBQUdJLFVBQVUsR0FBRyxDQUFDO0lBRTFCVixlQUFlLENBQUN0RSxJQUFJLENBQUMrRSxZQUFZLENBQUM7SUFDbENSLGFBQWEsQ0FBQ3ZFLElBQUksQ0FBQ2dGLFVBQVUsQ0FBQztFQUNoQztFQUVBLE9BQU87SUFBRUMsVUFBVSxFQUFFWCxlQUFlO0lBQUVZLFFBQVEsRUFBRVgsYUFBYTtJQUFFSCxPQUFPLEVBQUVBO0VBQVEsQ0FBQztBQUNuRjtBQUVBLE1BQU1lLEdBQUcsR0FBRyxJQUFJQyx3QkFBUyxDQUFDLENBQUM7O0FBRTNCO0FBQ08sU0FBU0MsUUFBUUEsQ0FBQ0MsR0FBVyxFQUFPO0VBQ3pDLE1BQU1DLE1BQU0sR0FBR0osR0FBRyxDQUFDSyxLQUFLLENBQUNGLEdBQUcsQ0FBQztFQUM3QixJQUFJQyxNQUFNLENBQUNFLEtBQUssRUFBRTtJQUNoQixNQUFNRixNQUFNLENBQUNFLEtBQUs7RUFDcEI7RUFFQSxPQUFPRixNQUFNO0FBQ2YifQ== | ||
/** | ||
* get content size of object content to upload | ||
*/ | ||
async function getContentLength(s) { | ||
// use length property of string | Buffer | ||
if (typeof s === 'string' || Buffer.isBuffer(s)) { | ||
return s.length; | ||
} | ||
// property of `fs.ReadStream` | ||
const filePath = s.path; | ||
if (filePath && typeof filePath === 'string') { | ||
const stat = await _async.fsp.lstat(filePath); | ||
return stat.size; | ||
} | ||
// property of `fs.ReadStream` | ||
const fd = s.fd; | ||
if (fd && typeof fd === 'number') { | ||
const stat = await (0, _async.fstat)(fd); | ||
return stat.size; | ||
} | ||
return null; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,ey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BQUcsQ0FBQ0MsS0FBSyxDQUFDMUYsUUFBUSxDQUFDO0lBQ3RDLE9BQU93RixJQUFJLENBQUN0RCxJQUFJO0VBQ2xCOztFQUVBO0VBQ0EsTUFBTXlELEVBQUUsR0FBSTVHLENBQUMsQ0FBd0M0RyxFQUErQjtFQUNwRixJQUFJQSxFQUFFLElBQUksT0FBT0EsRUFBRSxLQUFLLFFBQVEsRUFBRTtJQUNoQyxNQUFNSCxJQUFJLEdBQUcsTUFBTSxJQUFBSSxZQUFLLEVBQUNELEVBQUUsQ0FBQztJQUM1QixPQUFPSCxJQUFJLENBQUN0RCxJQUFJO0VBQ2xCO0VBRUEsT0FBTyxJQUFJO0FBQ2IifQ== |
@@ -6,2 +6,5 @@ /// <reference types="node" /> | ||
import type { Readable as ReadableStream } from 'node:stream'; | ||
export type VersionIdentificator = { | ||
versionId?: string; | ||
}; | ||
export type Binary = string | Buffer; | ||
@@ -18,2 +21,3 @@ export type ResponseHeader = Record<string, string>; | ||
}; | ||
export type EnabledOrDisabledStatus = 'Enabled' | 'Disabled'; | ||
export declare enum ENCRYPTION_TYPES { | ||
@@ -106,3 +110,3 @@ /** | ||
export type ReplicationRuleStatus = { | ||
Status: 'Enabled' | 'Disabled'; | ||
Status: EnabledOrDisabledStatus; | ||
}; | ||
@@ -113,2 +117,3 @@ export type Tag = { | ||
}; | ||
export type Tags = Record<string, string>; | ||
export type ReplicationRuleDestination = { | ||
@@ -154,2 +159,161 @@ Bucket: string; | ||
}; | ||
export type ResultCallback<T> = (error: Error | null, result: T) => void; | ||
export type ResultCallback<T> = (error: Error | null, result: T) => void; | ||
export type GetObjectLegalHoldOptions = { | ||
versionId: string; | ||
}; | ||
/** | ||
* @deprecated keep for backward compatible, use `LEGAL_HOLD_STATUS` instead | ||
*/ | ||
export type LegalHoldStatus = LEGAL_HOLD_STATUS; | ||
export type PutObjectLegalHoldOptions = { | ||
versionId?: string; | ||
status: LEGAL_HOLD_STATUS; | ||
}; | ||
export interface UploadedObjectInfo { | ||
etag: string; | ||
versionId: string | null; | ||
} | ||
export interface RetentionOptions { | ||
versionId: string; | ||
mode?: RETENTION_MODES; | ||
retainUntilDate?: IsoDate; | ||
governanceBypass?: boolean; | ||
} | ||
export type Retention = RetentionOptions | EmptyObject; | ||
export type IsoDate = string; | ||
export type EmptyObject = Record<string, never>; | ||
export type ObjectLockInfo = { | ||
objectLockEnabled: EnabledOrDisabledStatus; | ||
mode: RETENTION_MODES; | ||
unit: RETENTION_VALIDITY_UNITS; | ||
validity: number; | ||
} | EmptyObject; | ||
export type ObjectLockConfigParam = { | ||
ObjectLockEnabled?: 'Enabled' | undefined; | ||
Rule?: { | ||
DefaultRetention: { | ||
Mode: RETENTION_MODES; | ||
Days: number; | ||
Years: number; | ||
} | EmptyObject; | ||
} | EmptyObject; | ||
}; | ||
export type VersioningEnabled = 'Enabled'; | ||
export type VersioningSuspended = 'Suspended'; | ||
export type BucketVersioningConfiguration = { | ||
Status: VersioningEnabled | VersioningSuspended; | ||
}; | ||
export type TaggingOpts = { | ||
versionId: string; | ||
}; | ||
export type PutTaggingParams = { | ||
bucketName: string; | ||
objectName?: string; | ||
tags: Tags; | ||
putOpts?: TaggingOpts; | ||
}; | ||
export type RemoveTaggingParams = { | ||
bucketName: string; | ||
objectName?: string; | ||
removeOpts?: TaggingOpts; | ||
}; | ||
export type InputSerialization = { | ||
CompressionType?: 'NONE' | 'GZIP' | 'BZIP2'; | ||
CSV?: { | ||
AllowQuotedRecordDelimiter?: boolean; | ||
Comments?: string; | ||
FieldDelimiter?: string; | ||
FileHeaderInfo?: 'NONE' | 'IGNORE' | 'USE'; | ||
QuoteCharacter?: string; | ||
QuoteEscapeCharacter?: string; | ||
RecordDelimiter?: string; | ||
}; | ||
JSON?: { | ||
Type: 'DOCUMENT' | 'LINES'; | ||
}; | ||
Parquet?: EmptyObject; | ||
}; | ||
export type OutputSerialization = { | ||
CSV?: { | ||
FieldDelimiter?: string; | ||
QuoteCharacter?: string; | ||
QuoteEscapeCharacter?: string; | ||
QuoteFields?: string; | ||
RecordDelimiter?: string; | ||
}; | ||
JSON?: { | ||
RecordDelimiter?: string; | ||
}; | ||
}; | ||
export type SelectProgress = { | ||
Enabled: boolean; | ||
}; | ||
export type ScanRange = { | ||
Start: number; | ||
End: number; | ||
}; | ||
export type SelectOptions = { | ||
expression: string; | ||
expressionType?: string; | ||
inputSerialization: InputSerialization; | ||
outputSerialization: OutputSerialization; | ||
requestProgress?: SelectProgress; | ||
scanRange?: ScanRange; | ||
}; | ||
export type Expiration = { | ||
Date: string; | ||
Days: number; | ||
DeleteMarker: boolean; | ||
DeleteAll: boolean; | ||
}; | ||
export type RuleFilterAnd = { | ||
Prefix: string; | ||
Tags: Tag[]; | ||
}; | ||
export type RuleFilter = { | ||
And?: RuleFilterAnd; | ||
Prefix: string; | ||
Tag?: Tag[]; | ||
}; | ||
export type NoncurrentVersionExpiration = { | ||
NoncurrentDays: number; | ||
NewerNoncurrentVersions?: number; | ||
}; | ||
export type NoncurrentVersionTransition = { | ||
StorageClass: string; | ||
NoncurrentDays?: number; | ||
NewerNoncurrentVersions?: number; | ||
}; | ||
export type Transition = { | ||
Date?: string; | ||
StorageClass: string; | ||
Days: number; | ||
}; | ||
export type AbortIncompleteMultipartUpload = { | ||
DaysAfterInitiation: number; | ||
}; | ||
export type LifecycleRule = { | ||
AbortIncompleteMultipartUpload?: AbortIncompleteMultipartUpload; | ||
ID: string; | ||
Prefix?: string; | ||
Status?: string; | ||
Expiration?: Expiration; | ||
RuleFilter?: RuleFilter; | ||
NoncurrentVersionExpiration?: NoncurrentVersionExpiration; | ||
NoncurrentVersionTransition?: NoncurrentVersionTransition; | ||
Transition?: Transition; | ||
}; | ||
export type LifecycleConfig = { | ||
Rule: LifecycleRule[]; | ||
}; | ||
export type LifeCycleConfigParam = LifecycleConfig | null | undefined | ''; | ||
export type ApplySSEByDefault = { | ||
KmsMasterKeyID?: string; | ||
SSEAlgorithm: string; | ||
}; | ||
export type EncryptionRule = { | ||
ApplyServerSideEncryptionByDefault?: ApplySSEByDefault; | ||
}; | ||
export type EncryptionConfig = { | ||
Rule: EncryptionRule[]; | ||
}; |
@@ -32,3 +32,6 @@ "use strict"; | ||
/* Replication Config types */ | ||
/** | ||
* @deprecated keep for backward compatible, use `LEGAL_HOLD_STATUS` instead | ||
*/ | ||
exports.LEGAL_HOLD_STATUS = LEGAL_HOLD_STATUS; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJFTkNSWVBUSU9OX1RZUEVTIiwiZXhwb3J0cyIsIlJFVEVOVElPTl9NT0RFUyIsIlJFVEVOVElPTl9WQUxJRElUWV9VTklUUyIsIkxFR0FMX0hPTERfU1RBVFVTIl0sInNvdXJjZXMiOlsidHlwZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSAqIGFzIGh0dHAgZnJvbSAnbm9kZTpodHRwJ1xuaW1wb3J0IHR5cGUgeyBSZWFkYWJsZSBhcyBSZWFkYWJsZVN0cmVhbSB9IGZyb20gJ25vZGU6c3RyZWFtJ1xuXG5leHBvcnQgdHlwZSBCaW5hcnkgPSBzdHJpbmcgfCBCdWZmZXJcblxuLy8gbm9kZWpzIEluY29taW5nSHR0cEhlYWRlcnMgaXMgUmVjb3JkPHN0cmluZywgc3RyaW5nIHwgc3RyaW5nW10+LCBidXQgaXQncyBhY3R1YWxseSB0aGlzOlxuZXhwb3J0IHR5cGUgUmVzcG9uc2VIZWFkZXIgPSBSZWNvcmQ8c3RyaW5nLCBzdHJpbmc+XG5cbmV4cG9ydCB0eXBlIE9iamVjdE1ldGFEYXRhID0gUmVjb3JkPHN0cmluZywgc3RyaW5nIHwgbnVtYmVyPlxuXG5leHBvcnQgdHlwZSBSZXF1ZXN0SGVhZGVycyA9IFJlY29yZDxzdHJpbmcsIHN0cmluZyB8IGJvb2xlYW4gfCBudW1iZXIgfCB1bmRlZmluZWQ+XG5cbmV4cG9ydCB0e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BaUI7RUFBakJBLGlCQUFpQjtFQUFqQkEsaUJBQWlCO0VBQUEsT0FBakJBLGlCQUFpQjtBQUFBO0FBMEY3QjtBQTJEQTtBQU9BO0FBQ0E7QUFDQTtBQUZBSCxPQUFBLENBQUFHLGlCQUFBLEdBQUFBLGlCQUFBIn0= |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import type * as http from 'node:http'; | ||
import type { BucketItemFromList, BucketItemWithMetadata, ReplicationConfig } from "./type.js"; | ||
import { SelectResults } from "../helpers.js"; | ||
import type { BucketItemFromList, BucketItemWithMetadata, ObjectLockInfo, ReplicationConfig } from "./type.js"; | ||
export declare function parseBucketRegion(xml: string): string; | ||
@@ -44,2 +46,43 @@ export declare function parseError(xml: string, headerInfo: Record<string, unknown>): Record<string, unknown>; | ||
export declare function parseInitiateMultipart(xml: string): string; | ||
export declare function parseReplicationConfig(xml: string): ReplicationConfig; | ||
export declare function parseReplicationConfig(xml: string): ReplicationConfig; | ||
export declare function parseObjectLegalHoldConfig(xml: string): any; | ||
export declare function parseTagging(xml: string): any; | ||
export declare function parseCompleteMultipart(xml: string): { | ||
location: any; | ||
bucket: any; | ||
key: any; | ||
etag: any; | ||
errCode?: undefined; | ||
errMessage?: undefined; | ||
} | { | ||
errCode: any; | ||
errMessage: any; | ||
location?: undefined; | ||
bucket?: undefined; | ||
key?: undefined; | ||
etag?: undefined; | ||
} | undefined; | ||
type UploadID = string; | ||
export type ListMultipartResult = { | ||
uploads: { | ||
key: string; | ||
uploadId: UploadID; | ||
initiator: unknown; | ||
owner: unknown; | ||
storageClass: unknown; | ||
initiated: Date; | ||
}[]; | ||
prefixes: { | ||
prefix: string; | ||
}[]; | ||
isTruncated: boolean; | ||
nextKeyMarker: string; | ||
nextUploadIdMarker: string; | ||
}; | ||
export declare function parseListMultipart(xml: string): ListMultipartResult; | ||
export declare function parseObjectLockConfig(xml: string): ObjectLockInfo; | ||
export declare function parseBucketVersioningConfig(xml: string): any; | ||
export declare function parseSelectObjectContentResponse(res: Buffer): SelectResults | undefined; | ||
export declare function parseLifecycleConfig(xml: string): any; | ||
export declare function parseBucketEncryptionConfig(xml: string): any; | ||
export {}; |
// imported from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/93cfb0ec069731dcdfc31464788613f7cddb8192/types/minio/index.d.ts | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { EventEmitter } from 'node:events'; | ||
import type { Readable as ReadableStream } from 'node:stream'; | ||
import type { CopyDestinationOptions, CopySourceOptions, LEGAL_HOLD_STATUS, RETENTION_MODES, RETENTION_VALIDITY_UNITS } from "./helpers.js"; | ||
@@ -11,12 +9,13 @@ import type { ClientOptions, NoResultCallback, RemoveOptions } from "./internal/client.js"; | ||
import { PostPolicy } from "./internal/post-policy.js"; | ||
import type { Region } from "./internal/s3-endpoints.js"; | ||
import type { BucketItem, BucketItemCopy, BucketItemFromList, BucketItemStat, BucketItemWithMetadata, BucketStream, ExistingObjectReplication, IncompleteUploadedBucketItem, ItemBucketMetadata, ItemBucketMetadataList, MetadataItem, ReplicaModifications, ReplicationConfig, ReplicationConfigOpts, ReplicationRule, ReplicationRuleAnd, ReplicationRuleDestination, ReplicationRuleFilter, ReplicationRuleStatus, ResultCallback, SourceSelectionCriteria, Tag } from "./internal/type.js"; | ||
import type { BucketItem, BucketItemCopy, BucketItemFromList, BucketItemStat, BucketItemWithMetadata, BucketStream, EmptyObject, ExistingObjectReplication, GetObjectLegalHoldOptions, IncompleteUploadedBucketItem, InputSerialization, IsoDate, ItemBucketMetadata, ItemBucketMetadataList, LegalHoldStatus, LifecycleConfig, LifecycleRule, MetadataItem, ObjectLockInfo, OutputSerialization, PutObjectLegalHoldOptions, ReplicaModifications, ReplicationConfig, ReplicationConfigOpts, ReplicationRule, ReplicationRuleAnd, ReplicationRuleDestination, ReplicationRuleFilter, ReplicationRuleStatus, ResultCallback, Retention, RetentionOptions, ScanRange, SelectOptions, SelectProgress, SourceSelectionCriteria, Tag, VersionIdentificator } from "./internal/type.js"; | ||
import type { NotificationConfig, NotificationEvent, NotificationPoller } from "./notification.js"; | ||
export * from "./errors.js"; | ||
export * from "./helpers.js"; | ||
export type { Region } from "./internal/s3-endpoints.js"; | ||
export type * from "./notification.js"; | ||
export * from "./notification.js"; | ||
export { CopyConditions, PostPolicy }; | ||
export type { BucketItem, BucketItemCopy, BucketItemFromList, BucketItemStat, BucketItemWithMetadata, BucketStream, ClientOptions, ExistingObjectReplication, IncompleteUploadedBucketItem, ItemBucketMetadata, ItemBucketMetadataList, MetadataItem, NoResultCallback, RemoveOptions, ReplicaModifications, ReplicationConfig, ReplicationConfigOpts, ReplicationRule, ReplicationRuleAnd, ReplicationRuleDestination, ReplicationRuleFilter, ReplicationRuleStatus, SourceSelectionCriteria, Tag }; | ||
export type { MakeBucketOpt } from "./internal/client.js"; | ||
export type { BucketItem, BucketItemCopy, BucketItemFromList, BucketItemStat, BucketItemWithMetadata, BucketStream, ClientOptions, EmptyObject, ExistingObjectReplication, GetObjectLegalHoldOptions, IncompleteUploadedBucketItem, InputSerialization, IsoDate, ItemBucketMetadata, ItemBucketMetadataList, LegalHoldStatus, LifecycleConfig, LifecycleRule, MetadataItem, NoResultCallback, ObjectLockInfo, OutputSerialization, PutObjectLegalHoldOptions, RemoveOptions, ReplicaModifications, ReplicationConfig, ReplicationConfigOpts, ReplicationRule, ReplicationRuleAnd, ReplicationRuleDestination, ReplicationRuleFilter, ReplicationRuleStatus, Retention, RetentionOptions, ScanRange, SelectOptions, SelectProgress, SourceSelectionCriteria, Tag }; | ||
// Exports only from typings | ||
export type NotificationEvent = 's3:ObjectCreated:*' | 's3:ObjectCreated:Put' | 's3:ObjectCreated:Post' | 's3:ObjectCreated:Copy' | 's3:ObjectCreated:CompleteMultipartUpload' | 's3:ObjectRemoved:*' | 's3:ObjectRemoved:Delete' | 's3:ObjectRemoved:DeleteMarkerCreated' | 's3:ReducedRedundancyLostObject' | 's3:TestEvent' | 's3:ObjectRestore:Post' | 's3:ObjectRestore:Completed' | 's3:Replication:OperationFailedReplication' | 's3:Replication:OperationMissedThreshold' | 's3:Replication:OperationReplicatedAfterThreshold' | 's3:Replication:OperationNotTracked' | string; | ||
/** | ||
@@ -31,16 +30,4 @@ * @deprecated keep for backward compatible, use `RETENTION_MODES` instead | ||
export type LockUnit = RETENTION_VALIDITY_UNITS; | ||
/** | ||
* @deprecated keep for backward compatible | ||
*/ | ||
export type LegalHoldStatus = LEGAL_HOLD_STATUS; | ||
export type VersioningConfig = Record<string | number | symbol, unknown>; | ||
export type TagList = Record<string, string>; | ||
export type EmptyObject = Record<string, never>; | ||
export type VersionIdentificator = Pick<RetentionOptions, 'versionId'>; | ||
export type Lifecycle = LifecycleConfig | null | ''; | ||
export type Lock = LockConfig | EmptyObject; | ||
export type Encryption = EncryptionConfig | EmptyObject; | ||
export type Retention = RetentionOptions | EmptyObject; | ||
export type IsoDate = string; | ||
export interface PostPolicyResult { | ||
@@ -52,12 +39,2 @@ postURL: string; | ||
} | ||
export interface UploadedObjectInfo { | ||
etag: string; | ||
versionId: string | null; | ||
} | ||
export interface LifecycleConfig { | ||
Rule: LifecycleRule[]; | ||
} | ||
export interface LifecycleRule { | ||
[key: string]: any; | ||
} | ||
export interface LockConfig { | ||
@@ -68,14 +45,2 @@ mode: RETENTION_MODES; | ||
} | ||
export interface EncryptionConfig { | ||
Rule: EncryptionRule[]; | ||
} | ||
export interface EncryptionRule { | ||
[key: string]: any; | ||
} | ||
export interface RetentionOptions { | ||
versionId: string; | ||
mode?: RETENTION_MODES; | ||
retainUntilDate?: IsoDate; | ||
governanceBypass?: boolean; | ||
} | ||
export interface LegalHoldOptions { | ||
@@ -85,43 +50,2 @@ versionId: string; | ||
} | ||
export interface InputSerialization { | ||
CompressionType?: 'NONE' | 'GZIP' | 'BZIP2'; | ||
CSV?: { | ||
AllowQuotedRecordDelimiter?: boolean; | ||
Comments?: string; | ||
FieldDelimiter?: string; | ||
FileHeaderInfo?: 'NONE' | 'IGNORE' | 'USE'; | ||
QuoteCharacter?: string; | ||
QuoteEscapeCharacter?: string; | ||
RecordDelimiter?: string; | ||
}; | ||
JSON?: { | ||
Type: 'DOCUMENT' | 'LINES'; | ||
}; | ||
Parquet?: EmptyObject; | ||
} | ||
export interface OutputSerialization { | ||
CSV?: { | ||
FieldDelimiter?: string; | ||
QuoteCharacter?: string; | ||
QuoteEscapeCharacter?: string; | ||
QuoteFields?: string; | ||
RecordDelimiter?: string; | ||
}; | ||
JSON?: { | ||
RecordDelimiter?: string; | ||
}; | ||
} | ||
export interface SelectOptions { | ||
expression: string; | ||
expressionType?: string; | ||
inputSerialization: InputSerialization; | ||
outputSerialization: OutputSerialization; | ||
requestProgress?: { | ||
Enabled: boolean; | ||
}; | ||
scanRange?: { | ||
Start: number; | ||
End: number; | ||
}; | ||
} | ||
export interface SourceObjectStats { | ||
@@ -135,68 +59,6 @@ size: number; | ||
// No need to export this. But without it - linter error. | ||
export class TargetConfig { | ||
setId(id: unknown): void; | ||
addEvent(newEvent: unknown): void; | ||
addFilterSuffix(suffix: string): void; | ||
addFilterPrefix(prefix: string): void; | ||
} | ||
export interface MakeBucketOpt { | ||
ObjectLocking: boolean; | ||
} | ||
// Exports from library | ||
export class Client extends TypedClient { | ||
// Bucket operations | ||
makeBucket(bucketName: string, region: Region, makeOpts: MakeBucketOpt, callback: NoResultCallback): void; | ||
makeBucket(bucketName: string, region: Region, callback: NoResultCallback): void; | ||
makeBucket(bucketName: string, callback: NoResultCallback): void; | ||
makeBucket(bucketName: string, region?: Region, makeOpts?: MakeBucketOpt): Promise<void>; | ||
bucketExists(bucketName: string, callback: ResultCallback<boolean>): void; | ||
bucketExists(bucketName: string): Promise<boolean>; | ||
listObjects(bucketName: string, prefix?: string, recursive?: boolean): BucketStream<BucketItem>; | ||
listObjectsV2(bucketName: string, prefix?: string, recursive?: boolean, startAfter?: string): BucketStream<BucketItem>; | ||
listIncompleteUploads(bucketName: string, prefix?: string, recursive?: boolean): BucketStream<IncompleteUploadedBucketItem>; | ||
getBucketVersioning(bucketName: string, callback: ResultCallback<VersioningConfig>): void; | ||
getBucketVersioning(bucketName: string): Promise<VersioningConfig>; | ||
setBucketVersioning(bucketName: string, versioningConfig: any, callback: NoResultCallback): void; | ||
setBucketVersioning(bucketName: string, versioningConfig: any): Promise<void>; | ||
getBucketTagging(bucketName: string, callback: ResultCallback<Tag[]>): void; | ||
getBucketTagging(bucketName: string): Promise<Tag[]>; | ||
setBucketTagging(bucketName: string, tags: TagList, callback: NoResultCallback): void; | ||
setBucketTagging(bucketName: string, tags: TagList): Promise<void>; | ||
removeBucketTagging(bucketName: string, callback: NoResultCallback): void; | ||
removeBucketTagging(bucketName: string): Promise<void>; | ||
setBucketLifecycle(bucketName: string, lifecycleConfig: Lifecycle, callback: NoResultCallback): void; | ||
setBucketLifecycle(bucketName: string, lifecycleConfig: Lifecycle): Promise<void>; | ||
getBucketLifecycle(bucketName: string, callback: ResultCallback<Lifecycle>): void; | ||
getBucketLifecycle(bucketName: string): Promise<Lifecycle>; | ||
removeBucketLifecycle(bucketName: string, callback: NoResultCallback): void; | ||
removeBucketLifecycle(bucketName: string): Promise<void>; | ||
setObjectLockConfig(bucketName: string, callback: NoResultCallback): void; | ||
setObjectLockConfig(bucketName: string, lockConfig: Lock, callback: NoResultCallback): void; | ||
setObjectLockConfig(bucketName: string, lockConfig?: Lock): Promise<void>; | ||
getObjectLockConfig(bucketName: string, callback: ResultCallback<Lock>): void; | ||
getObjectLockConfig(bucketName: string): Promise<Lock>; | ||
getBucketEncryption(bucketName: string, callback: ResultCallback<Encryption>): void; | ||
getBucketEncryption(bucketName: string): Promise<Encryption>; | ||
setBucketEncryption(bucketName: string, encryptionConfig: Encryption, callback: NoResultCallback): void; | ||
setBucketEncryption(bucketName: string, encryptionConfig: Encryption): Promise<void>; | ||
removeBucketEncryption(bucketName: string, callback: NoResultCallback): void; | ||
removeBucketEncryption(bucketName: string): Promise<void>; | ||
// Object operations | ||
getObject(bucketName: string, objectName: string, callback: ResultCallback<ReadableStream>): void; | ||
getObject(bucketName: string, objectName: string): Promise<ReadableStream>; | ||
getPartialObject(bucketName: string, objectName: string, offset: number, callback: ResultCallback<ReadableStream>): void; | ||
getPartialObject(bucketName: string, objectName: string, offset: number, length: number, callback: ResultCallback<ReadableStream>): void; | ||
getPartialObject(bucketName: string, objectName: string, offset: number, length?: number): Promise<ReadableStream>; | ||
fGetObject(bucketName: string, objectName: string, filePath: string, callback: NoResultCallback): void; | ||
fGetObject(bucketName: string, objectName: string, filePath: string): Promise<void>; | ||
putObject(bucketName: string, objectName: string, stream: ReadableStream | Buffer | string, callback: ResultCallback<UploadedObjectInfo>): void; | ||
putObject(bucketName: string, objectName: string, stream: ReadableStream | Buffer | string, size: number, callback: ResultCallback<UploadedObjectInfo>): void; | ||
putObject(bucketName: string, objectName: string, stream: ReadableStream | Buffer | string, size: number, metaData: ItemBucketMetadata, callback: ResultCallback<UploadedObjectInfo>): void; | ||
putObject(bucketName: string, objectName: string, stream: ReadableStream | Buffer | string, size?: number, metaData?: ItemBucketMetadata): Promise<UploadedObjectInfo>; | ||
putObject(bucketName: string, objectName: string, stream: ReadableStream | Buffer | string, metaData?: ItemBucketMetadata): Promise<UploadedObjectInfo>; | ||
fPutObject(bucketName: string, objectName: string, filePath: string, metaData: ItemBucketMetadata, callback: ResultCallback<UploadedObjectInfo>): void; | ||
fPutObject(bucketName: string, objectName: string, filePath: string, metaData?: ItemBucketMetadata): Promise<UploadedObjectInfo>; | ||
copyObject(bucketName: string, objectName: string, sourceObject: string, conditions: CopyConditions, callback: ResultCallback<BucketItemCopy>): void; | ||
@@ -208,26 +70,6 @@ copyObject(bucketName: string, objectName: string, sourceObject: string, conditions: CopyConditions): Promise<BucketItemCopy>; | ||
removeIncompleteUpload(bucketName: string, objectName: string): Promise<void>; | ||
putObjectRetention(bucketName: string, objectName: string, callback: NoResultCallback): void; | ||
putObjectRetention(bucketName: string, objectName: string, retentionOptions: Retention, callback: NoResultCallback): void; | ||
putObjectRetention(bucketName: string, objectName: string, retentionOptions?: Retention): Promise<void>; | ||
getObjectRetention(bucketName: string, objectName: string, options: VersionIdentificator, callback: ResultCallback<Retention>): void; | ||
getObjectRetention(bucketName: string, objectName: string, options: VersionIdentificator): Promise<Retention>; | ||
setObjectTagging(bucketName: string, objectName: string, tags: TagList, callback: NoResultCallback): void; | ||
setObjectTagging(bucketName: string, objectName: string, tags: TagList, putOptions: VersionIdentificator, callback: NoResultCallback): void; | ||
setObjectTagging(bucketName: string, objectName: string, tags: TagList, putOptions?: VersionIdentificator): Promise<void>; | ||
removeObjectTagging(bucketName: string, objectName: string, callback: NoResultCallback): void; | ||
removeObjectTagging(bucketName: string, objectName: string, removeOptions: VersionIdentificator, callback: NoResultCallback): void; | ||
removeObjectTagging(bucketName: string, objectName: string, removeOptions?: VersionIdentificator): Promise<void>; | ||
getObjectTagging(bucketName: string, objectName: string, callback: ResultCallback<Tag[]>): void; | ||
getObjectTagging(bucketName: string, objectName: string, getOptions: VersionIdentificator, callback: ResultCallback<Tag[]>): void; | ||
getObjectTagging(bucketName: string, objectName: string, getOptions?: VersionIdentificator): Promise<Tag[]>; | ||
getObjectLegalHold(bucketName: string, objectName: string, callback: ResultCallback<LegalHoldOptions>): void; | ||
getObjectLegalHold(bucketName: string, objectName: string, getOptions: VersionIdentificator, callback: ResultCallback<LegalHoldOptions>): void; | ||
getObjectLegalHold(bucketName: string, objectName: string, getOptions?: VersionIdentificator): Promise<LegalHoldOptions>; | ||
setObjectLegalHold(bucketName: string, objectName: string, callback: NoResultCallback): void; | ||
setObjectLegalHold(bucketName: string, objectName: string, setOptions: LegalHoldOptions, callback: NoResultCallback): void; | ||
setObjectLegalHold(bucketName: string, objectName: string, setOptions?: LegalHoldOptions): Promise<void>; | ||
composeObject(destObjConfig: CopyDestinationOptions, sourceObjList: CopySourceOptions[], callback: ResultCallback<SourceObjectStats>): void; | ||
composeObject(destObjConfig: CopyDestinationOptions, sourceObjList: CopySourceOptions[]): Promise<SourceObjectStats>; | ||
selectObjectContent(bucketName: string, objectName: string, selectOpts: SelectOptions, callback: NoResultCallback): void; | ||
selectObjectContent(bucketName: string, objectName: string, selectOpts: SelectOptions): Promise<void>; | ||
@@ -270,6 +112,2 @@ // Presigned operations | ||
removeAllBucketNotification(bucketName: string): Promise<void>; | ||
getBucketPolicy(bucketName: string, callback: ResultCallback<string>): void; | ||
getBucketPolicy(bucketName: string): Promise<string>; | ||
setBucketPolicy(bucketName: string, bucketPolicy: string, callback: NoResultCallback): void; | ||
setBucketPolicy(bucketName: string, bucketPolicy: string): Promise<void>; | ||
listenBucketNotification(bucketName: string, prefix: string, suffix: string, events: NotificationEvent[]): NotificationPoller; | ||
@@ -279,31 +117,2 @@ | ||
newPostPolicy(): PostPolicy; | ||
} | ||
export declare class NotificationPoller extends EventEmitter { | ||
stop(): void; | ||
start(): void; | ||
// must to be public? | ||
checkForChanges(): void; | ||
} | ||
export declare class NotificationConfig { | ||
add(target: TopicConfig | QueueConfig | CloudFunctionConfig): void; | ||
} | ||
export declare class TopicConfig extends TargetConfig { | ||
constructor(arn: string); | ||
} | ||
export declare class QueueConfig extends TargetConfig { | ||
constructor(arn: string); | ||
} | ||
export declare class CloudFunctionConfig extends TargetConfig { | ||
constructor(arn: string); | ||
} | ||
export declare function buildARN(partition: string, service: string, region: string, accountId: string, resource: string): string; | ||
export declare const ObjectCreatedAll: NotificationEvent; // s3:ObjectCreated:*' | ||
export declare const ObjectCreatedPut: NotificationEvent; // s3:ObjectCreated:Put | ||
export declare const ObjectCreatedPost: NotificationEvent; // s3:ObjectCreated:Post | ||
export declare const ObjectCreatedCopy: NotificationEvent; // s3:ObjectCreated:Copy | ||
export declare const ObjectCreatedCompleteMultipartUpload: NotificationEvent; // s3:ObjectCreated:CompleteMultipartUpload | ||
export declare const ObjectRemovedAll: NotificationEvent; // s3:ObjectRemoved:* | ||
export declare const ObjectRemovedDelete: NotificationEvent; // s3:ObjectRemoved:Delete | ||
export declare const ObjectRemovedDeleteMarkerCreated: NotificationEvent; // s3:ObjectRemoved:DeleteMarkerCreated | ||
export declare const ObjectReducedRedundancyLostObject: NotificationEvent; // s3:ReducedRedundancyLostObject | ||
} |
@@ -6,8 +6,6 @@ "use strict"; | ||
}); | ||
var _events = require("events"); | ||
var _eventemitter = require("eventemitter3"); | ||
var _Parser = require("stream-json/jsonl/Parser.js"); | ||
var _helpers = require("./helpers.js"); | ||
var _helper = require("./internal/helper.js"); | ||
var transformers = _interopRequireWildcard(require("./transformers.js"), true); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
/* | ||
@@ -29,28 +27,5 @@ * MinIO Javascript Library for Amazon S3 Compatible Cloud Storage, (C) 2016 MinIO, Inc. | ||
// Notification config - array of target configs. | ||
// Target configs can be | ||
// 1. Topic (simple notification service) | ||
// 2. Queue (simple queue service) | ||
// 3. CloudFront (lambda function) | ||
class NotificationConfig { | ||
add(target) { | ||
let instance = ''; | ||
if (target instanceof TopicConfig) { | ||
instance = 'TopicConfiguration'; | ||
} | ||
if (target instanceof QueueConfig) { | ||
instance = 'QueueConfiguration'; | ||
} | ||
if (target instanceof CloudFunctionConfig) { | ||
instance = 'CloudFunctionConfiguration'; | ||
} | ||
if (!this[instance]) { | ||
this[instance] = []; | ||
} | ||
this[instance].push(target); | ||
} | ||
} | ||
// TODO: type this | ||
// Base class for three supported configs. | ||
exports.NotificationConfig = NotificationConfig; | ||
class TargetConfig { | ||
@@ -95,2 +70,3 @@ setId(id) { | ||
// 1. Topic (simple notification service) | ||
exports.TargetConfig = TargetConfig; | ||
class TopicConfig extends TargetConfig { | ||
@@ -120,3 +96,27 @@ constructor(arn) { | ||
} | ||
// Notification config - array of target configs. | ||
// Target configs can be | ||
// 1. Topic (simple notification service) | ||
// 2. Queue (simple queue service) | ||
// 3. CloudFront (lambda function) | ||
exports.CloudFunctionConfig = CloudFunctionConfig; | ||
class NotificationConfig { | ||
add(target) { | ||
let instance; | ||
if (target instanceof TopicConfig) { | ||
instance = this.TopicConfiguration ?? (this.TopicConfiguration = []); | ||
} | ||
if (target instanceof QueueConfig) { | ||
instance = this.QueueConfiguration ?? (this.QueueConfiguration = []); | ||
} | ||
if (target instanceof CloudFunctionConfig) { | ||
instance = this.CloudFunctionConfiguration ?? (this.CloudFunctionConfiguration = []); | ||
} | ||
if (instance) { | ||
instance.push(target); | ||
} | ||
} | ||
} | ||
exports.NotificationConfig = NotificationConfig; | ||
const buildARN = (partition, service, region, accountId, resource) => { | ||
@@ -144,7 +144,10 @@ return 'arn:' + partition + ':' + service + ':' + region + ':' + accountId + ':' + resource; | ||
// put string at least so auto-complete could work | ||
// TODO: type this | ||
exports.ObjectReducedRedundancyLostObject = ObjectReducedRedundancyLostObject; | ||
// Poll for notifications, used in #listenBucketNotification. | ||
// Listening constitutes repeatedly requesting s3 whether or not any | ||
// changes have occurred. | ||
exports.ObjectReducedRedundancyLostObject = ObjectReducedRedundancyLostObject; | ||
class NotificationPoller extends _events.EventEmitter { | ||
class NotificationPoller extends _eventemitter.EventEmitter { | ||
constructor(client, bucketName, prefix, suffix, events) { | ||
@@ -177,10 +180,10 @@ super(); | ||
} | ||
let method = 'GET'; | ||
var queries = []; | ||
const method = 'GET'; | ||
const queries = []; | ||
if (this.prefix) { | ||
var prefix = (0, _helper.uriEscape)(this.prefix); | ||
const prefix = (0, _helper.uriEscape)(this.prefix); | ||
queries.push(`prefix=${prefix}`); | ||
} | ||
if (this.suffix) { | ||
var suffix = (0, _helper.uriEscape)(this.suffix); | ||
const suffix = (0, _helper.uriEscape)(this.suffix); | ||
queries.push(`suffix=${suffix}`); | ||
@@ -192,3 +195,3 @@ } | ||
queries.sort(); | ||
var query = ''; | ||
let query = ''; | ||
if (queries.length > 0) { | ||
@@ -198,15 +201,12 @@ query = `${queries.join('&')}`; | ||
const region = this.client.region || _helpers.DEFAULT_REGION; | ||
this.client.makeRequest({ | ||
this.client.makeRequestAsync({ | ||
method, | ||
bucketName: this.bucketName, | ||
query | ||
}, '', [200], region, true, (e, response) => { | ||
if (e) { | ||
return this.emit('error', e); | ||
} | ||
let transformer = transformers.getNotificationTransformer(); | ||
(0, _helper.pipesetup)(response, transformer).on('data', result => { | ||
}, '', [200], region).then(response => { | ||
const asm = _Parser.make(); | ||
(0, _helper.pipesetup)(response, asm).on('data', data => { | ||
// Data is flushed periodically (every 5 seconds), so we should | ||
// handle it after flushing from the JSON parser. | ||
let records = result.Records; | ||
let records = data.value.Records; | ||
// If null (= no records), change to an empty array. | ||
@@ -224,3 +224,3 @@ if (!records) { | ||
if (this.ending) { | ||
response.destroy(); | ||
response === null || response === void 0 ? void 0 : response.destroy(); | ||
} | ||
@@ -233,2 +233,4 @@ }).on('error', e => this.emit('error', e)).on('end', () => { | ||
}); | ||
}, e => { | ||
return this.emit('error', e); | ||
}); | ||
@@ -238,2 +240,2 @@ } | ||
exports.NotificationPoller = NotificationPoller; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfZXZlbnRzIiwicmVxdWlyZSIsIl9oZWxwZXJzIiwiX2hlbHBlciIsInRyYW5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DQUEsT0FBTyxDQUFDaEIsT0FBTyxDQUFFbUIsTUFBMEIsSUFBSztVQUM5QyxJQUFJLENBQUNDLElBQUksQ0FBQyxjQUFjLEVBQUVELE1BQU0sQ0FBQztRQUNuQyxDQUFDLENBQUM7O1FBRUY7UUFDQSxJQUFJLElBQUksQ0FBQzVCLE1BQU0sRUFBRTtVQUNma0IsUUFBUSxhQUFSQSxRQUFRLHVCQUFSQSxRQUFRLENBQUVZLE9BQU8sQ0FBQyxDQUFDO1FBQ3JCO01BQ0YsQ0FBQyxDQUFDLENBQ0RQLEVBQUUsQ0FBQyxPQUFPLEVBQUdRLENBQUMsSUFBSyxJQUFJLENBQUNGLElBQUksQ0FBQyxPQUFPLEVBQUVFLENBQUMsQ0FBQyxDQUFDLENBQ3pDUixFQUFFLENBQUMsS0FBSyxFQUFFLE1BQU07UUFDZjtRQUNBckIsT0FBTyxDQUFDQyxRQUFRLENBQUMsTUFBTTtVQUNyQixJQUFJLENBQUNDLGVBQWUsQ0FBQyxDQUFDO1FBQ3hCLENBQUMsQ0FBQztNQUNKLENBQUMsQ0FBQztJQUNOLENBQUMsRUFDQTJCLENBQUMsSUFBSztNQUNMLE9BQU8sSUFBSSxDQUFDRixJQUFJLENBQUMsT0FBTyxFQUFFRSxDQUFDLENBQUM7SUFDOUIsQ0FDRixDQUFDO0VBQ0g7QUFDRjtBQUFDbkUsT0FBQSxDQUFBK0Isa0JBQUEsR0FBQUEsa0JBQUEifQ== |
@@ -6,24 +6,14 @@ "use strict"; | ||
}); | ||
exports.bucketEncryptionTransformer = bucketEncryptionTransformer; | ||
exports.bucketVersioningTransformer = bucketVersioningTransformer; | ||
exports.getBucketNotificationTransformer = getBucketNotificationTransformer; | ||
exports.getCompleteMultipartTransformer = getCompleteMultipartTransformer; | ||
exports.getConcater = getConcater; | ||
exports.getCopyObjectTransformer = getCopyObjectTransformer; | ||
exports.getHashSummer = getHashSummer; | ||
exports.getListMultipartTransformer = getListMultipartTransformer; | ||
exports.getListObjectsTransformer = getListObjectsTransformer; | ||
exports.getListObjectsV2Transformer = getListObjectsV2Transformer; | ||
exports.getListObjectsV2WithMetadataTransformer = getListObjectsV2WithMetadataTransformer; | ||
exports.getNotificationTransformer = getNotificationTransformer; | ||
exports.getTagsTransformer = getTagsTransformer; | ||
exports.lifecycleTransformer = lifecycleTransformer; | ||
exports.objectLegalHoldTransformer = objectLegalHoldTransformer; | ||
exports.objectLockTransformer = objectLockTransformer; | ||
exports.objectRetentionTransformer = objectRetentionTransformer; | ||
exports.removeObjectsTransformer = removeObjectsTransformer; | ||
exports.selectObjectContentTransformer = selectObjectContentTransformer; | ||
exports.uploadPartTransformer = uploadPartTransformer; | ||
var Crypto = _interopRequireWildcard(require("crypto"), true); | ||
var _jsonStream = require("json-stream"); | ||
var _through = require("through2"); | ||
@@ -123,7 +113,2 @@ var _helper = require("./internal/helper.js"); | ||
// Parses listMultipartUploads response. | ||
function getListMultipartTransformer() { | ||
return getConcater(xmlParsers.parseListMultipart); | ||
} | ||
// Parses listObjects response. | ||
@@ -144,7 +129,2 @@ function getListObjectsTransformer() { | ||
// Parses completeMultipartUpload response. | ||
function getCompleteMultipartTransformer() { | ||
return getConcater(xmlParsers.parseCompleteMultipart); | ||
} | ||
// Parses GET/SET BucketNotification response | ||
@@ -154,26 +134,5 @@ function getBucketNotificationTransformer() { | ||
} | ||
// Parses a notification. | ||
function getNotificationTransformer() { | ||
// This will parse and return each object. | ||
return new _jsonStream(); | ||
} | ||
function bucketVersioningTransformer() { | ||
return getConcater(xmlParsers.parseBucketVersioningConfig); | ||
} | ||
function getTagsTransformer() { | ||
return getConcater(xmlParsers.parseTagging); | ||
} | ||
function lifecycleTransformer() { | ||
return getConcater(xmlParsers.parseLifecycleConfig); | ||
} | ||
function objectLockTransformer() { | ||
return getConcater(xmlParsers.parseObjectLockConfig); | ||
} | ||
function objectRetentionTransformer() { | ||
return getConcater(xmlParsers.parseObjectRetentionConfig); | ||
} | ||
function bucketEncryptionTransformer() { | ||
return getConcater(xmlParsers.parseBucketEncryptionConfig); | ||
} | ||
function objectLegalHoldTransformer() { | ||
@@ -185,8 +144,5 @@ return getConcater(xmlParsers.parseObjectLegalHoldConfig); | ||
} | ||
function selectObjectContentTransformer() { | ||
return getConcater(); | ||
} | ||
function removeObjectsTransformer() { | ||
return getConcater(xmlParsers.removeObjectsParser); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJDcnlwdG8iLCJfaW50ZXJvcFJlcXVpcmVXaWxkY2FyZCIsInJlcXVpcmUiLCJfanNvblN0cmVhbSIsIl90aHJvdWdoIiwiX2hlbHBlciIsInhtbFBhcnNlcnMiLCJfZ2V0UmVxdWlyZVdpbGRjYXJkQ2FjaGUiLCJub2RlSW50ZXJvcCIsIldlYWtNYXAiLCJjYWNoZUJhYmVsSW50ZXJvcCIsImNhY2hlTm9kZUludGVyb3AiLCJvYmoiLCJfX2VzTW9kdWxlIiwiZGVmYXVsdCIsImNhY2hlIiwiaGFzIiwiZ2V0IiwibmV3T2JqIiwiaGFzUHJvcGVydHlEZXNjcmlwdG9yIiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IiLCJrZXkiLCJwcm90b3R5cGUiLCJoYXNPd25Qcm9wZXJ0eSIsImNhbGwiLCJkZXNjIiwic2V0IiwiZ2V0Q29uY2F0ZXIiLCJwYXJzZXIiLCJlbWl0RXJyb3IiLCJvYmplY3RNb2RlIiwiYnVmcyIsImlzRnVuY3Rpb24iLCJUeXBlRXJyb3IiLCJUaHJvdWdoMiIsImNodW5rIiwiZW5jIiwiY2IiLCJwdXNoIiwiQnVmZmVyIiwiY29uY2F0IiwidG9TdHJpbmciLCJsZW5ndGgiLCJnZXRIYXNoU3VtbWVyIiwiZW5hYmxlU0hBMjU2IiwibWQ1IiwiY3JlYXRlSGFzaCIsInNoYTI1NiIsInVwZGF0ZSIsIm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QUFDakQ7QUFFTyxTQUFTQyx3QkFBd0JBLENBQUEsRUFBRztFQUN6QyxPQUFPMUMsV0FBVyxDQUFDdkIsVUFBVSxDQUFDa0UsbUJBQW1CLENBQUM7QUFDcEQifQ== |
{ | ||
"name": "minio", | ||
"version": "7.1.3", | ||
"version": "7.1.4", | ||
"description": "S3 Compatible Cloud Storage client", | ||
@@ -62,2 +62,5 @@ "main": "./dist/main/minio.js", | ||
"prettier --write" | ||
], | ||
"*.md": [ | ||
"prettier --write" | ||
] | ||
@@ -86,12 +89,12 @@ }, | ||
"browser-or-node": "^2.1.1", | ||
"buffer-crc32": "^0.2.13", | ||
"buffer-crc32": "^1.0.0", | ||
"eventemitter3": "^5.0.1", | ||
"fast-xml-parser": "^4.2.2", | ||
"ipaddr.js": "^2.0.1", | ||
"json-stream": "^1.0.0", | ||
"lodash": "^4.17.21", | ||
"mime-types": "^2.1.35", | ||
"query-string": "^7.1.3", | ||
"stream-json": "^1.8.0", | ||
"through2": "^4.0.2", | ||
"web-encoding": "^1.1.5", | ||
"xml": "^1.0.1", | ||
"xml2js": "^0.5.0" | ||
@@ -107,7 +110,10 @@ }, | ||
"@types/async": "^3.2.20", | ||
"@types/block-stream2": "^2.1.2", | ||
"@types/chai": "^4.3.11", | ||
"@types/chai-as-promised": "^7.1.8", | ||
"@types/lodash": "^4.14.194", | ||
"@types/mime-types": "^2.1.1", | ||
"@types/node": "^20.1.0", | ||
"@types/stream-json": "^1.7.5", | ||
"@types/through2": "^2.0.38", | ||
"@types/xml": "^1.0.8", | ||
"@types/xml2js": "^0.4.11", | ||
@@ -120,2 +126,3 @@ "@typescript-eslint/eslint-plugin": "^5.59.2", | ||
"chai": "^4.3.7", | ||
"chai-as-promised": "^7.1.1", | ||
"dotenv": "^16.0.3", | ||
@@ -122,0 +129,0 @@ "eslint": "^8.40.0", |
@@ -38,5 +38,5 @@ # 适用于Amazon S3兼容云存储的Minio JavaScript Library [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) | ||
```js | ||
var Minio = require('minio') | ||
import * as Minio from 'minio' | ||
var minioClient = new Minio.Client({ | ||
const minioClient = new Minio.Client({ | ||
endPoint: 'play.min.io', | ||
@@ -59,7 +59,7 @@ port: 9000, | ||
```js | ||
var Minio = require('minio') | ||
import * as Minio from 'minio' | ||
// Instantiate the minio client with the endpoint | ||
// and access keys as shown below. | ||
var minioClient = new Minio.Client({ | ||
const minioClient = new Minio.Client({ | ||
endPoint: 'play.min.io', | ||
@@ -73,3 +73,3 @@ port: 9000, | ||
// File that needs to be uploaded. | ||
var file = '/tmp/photos-europe.tar' | ||
const file = '/tmp/photos-europe.tar' | ||
@@ -82,3 +82,3 @@ // Make a bucket called europetrip. | ||
var metaData = { | ||
const metaData = { | ||
'Content-Type': 'application/octet-stream', | ||
@@ -161,3 +161,3 @@ 'X-Amz-Meta-Testing': 1234, | ||
* [list-objects-v2.js](https://github.com/minio/minio-js/blob/master/examples/list-objects-v2.js) | ||
* [bucket-exists.js](https://github.com/minio/minio-js/blob/master/examples/bucket-exists.js) | ||
* [bucket-exists.mjs](https://github.com/minio/minio-js/blob/master/examples/bucket-exists.mjs) | ||
* [make-bucket.js](https://github.com/minio/minio-js/blob/master/examples/make-bucket.js) | ||
@@ -169,9 +169,9 @@ * [remove-bucket.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket.mjs) | ||
* [fput-object.js](https://github.com/minio/minio-js/blob/master/examples/fput-object.js) | ||
* [fget-object.js](https://github.com/minio/minio-js/blob/master/examples/fget-object.js) | ||
* [fget-object.mjs](https://github.com/minio/minio-js/blob/master/examples/fget-object.mjs) | ||
#### 完整示例 : 操作对象 | ||
* [put-object.js](https://github.com/minio/minio-js/blob/master/examples/put-object.js) | ||
* [get-object.js](https://github.com/minio/minio-js/blob/master/examples/get-object.js) | ||
* [get-object.mjs](https://github.com/minio/minio-js/blob/master/examples/get-object.mjs) | ||
* [copy-object.js](https://github.com/minio/minio-js/blob/master/examples/copy-object.js) | ||
* [get-partialobject.js](https://github.com/minio/minio-js/blob/master/examples/get-partialobject.js) | ||
* [get-partialobject.mjs](https://github.com/minio/minio-js/blob/master/examples/get-partialobject.mjs) | ||
* [remove-object.js](https://github.com/minio/minio-js/blob/master/examples/remove-object.js) | ||
@@ -194,3 +194,3 @@ * [remove-incomplete-upload.js](https://github.com/minio/minio-js/blob/master/examples/remove-incomplete-upload.js) | ||
* [get-bucket-policy.js](https://github.com/minio/minio-js/blob/master/examples/get-bucket-policy.js) | ||
* [set-bucket-policy.js](https://github.com/minio/minio-js/blob/master/examples/set-bucket-policy.js) | ||
* [set-bucket-policy.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-policy.mjs) | ||
@@ -197,0 +197,0 @@ ## 了解更多 |
187
README.md
@@ -5,7 +5,8 @@ # MinIO JavaScript Library for Amazon S3 Compatible Cloud Storage [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) | ||
The MinIO JavaScript Client SDK provides simple APIs to access any Amazon S3 compatible object storage server. | ||
The MinIO JavaScript Client SDK provides high level APIs to access any Amazon S3 compatible object storage server. | ||
This quickstart guide will show you how to install the client SDK and execute an example JavaScript program. For a complete list of APIs and examples, please take a look at the [JavaScript Client API Reference](https://min.io/docs/minio/linux/developers/javascript/API.html) documentation. | ||
This guide will show you how to install the client SDK and execute an example JavaScript program. | ||
For a complete list of APIs and examples, please take a look at the [JavaScript Client API Reference](https://min.io/docs/minio/linux/developers/javascript/API.html) documentation. | ||
This document assumes that you have a working [nodejs](http://nodejs.org/) setup in place. | ||
This document presumes you have a working [Node.js](http://nodejs.org/) development environment, LTS versions v16, v18 or v20. | ||
@@ -24,2 +25,3 @@ ## Download from NPM | ||
npm install | ||
npm run build | ||
npm install -g | ||
@@ -34,16 +36,16 @@ ``` | ||
You need five items in order to connect to MinIO object storage server. | ||
The following parameters are needed to connect to a MinIO object storage server: | ||
| Params | Description | | ||
| :-------- | :-------------------------------------------------------------------------------------------------- | | ||
| endPoint | URL to object storage service. | | ||
| port | TCP/IP port number. This input is optional. Default value set to `80` for HTTP and `443` for HTTPs. | | ||
| accessKey | Access key is like user ID that uniquely identifies your account. | | ||
| secretKey | Secret key is the password to your account. | | ||
| useSSL | Set this value to 'true' to enable secure (HTTPS) access | | ||
| Parameter | Description | | ||
| :---------- | :--------------------------------------------------------------------------- | | ||
| `endPoint` | Hostname of the object storage service. | | ||
| `port` | TCP/IP port number. Optional, defaults to `80` for HTTP and `443` for HTTPs. | | ||
| `accessKey` | Access key (user ID) of an account in the S3 service. | | ||
| `secretKey` | Secret key (password) of an account in the S3 service. | | ||
| `useSSL` | Optional, set to 'true' to enable secure (HTTPS) access. | | ||
```js | ||
var Minio = require('minio') | ||
import * as Minio from 'minio' | ||
var minioClient = new Minio.Client({ | ||
const minioClient = new Minio.Client({ | ||
endPoint: 'play.min.io', | ||
@@ -59,14 +61,18 @@ port: 9000, | ||
This example program connects to an object storage server, makes a bucket on the server and then uploads a file to the bucket. | ||
This example connects to an object storage server, creates a bucket, and uploads a file to the bucket. | ||
It uses the MinIO `play` server, a public MinIO cluster located at [https://play.min.io](https://play.min.io). | ||
We will use the MinIO server running at [https://play.min.io](https://play.min.io) in this example. Feel free to use this service for testing and development. Access credentials shown in this example are open to the public. | ||
The `play` server runs the latest stable version of MinIO and may be used for testing and development. | ||
The access credentials shown in this example are open to the public. | ||
All data uploaded to `play` should be considered public and non-protected. | ||
#### file-uploader.js | ||
#### file-uploader.mjs | ||
```js | ||
var Minio = require('minio') | ||
import * as Minio from 'minio' | ||
// Instantiate the minio client with the endpoint | ||
// and access keys as shown below. | ||
var minioClient = new Minio.Client({ | ||
// Instantiate the MinIO client with the object store service | ||
// endpoint and an authorized user's credentials | ||
// play.min.io is the MinIO public test cluster | ||
const minioClient = new Minio.Client({ | ||
endPoint: 'play.min.io', | ||
@@ -79,41 +85,57 @@ port: 9000, | ||
// File that needs to be uploaded. | ||
var file = '/tmp/photos-europe.tar' | ||
// File to upload | ||
const sourceFile = '/tmp/test-file.txt' | ||
// Make a bucket called europetrip. | ||
minioClient.makeBucket('europetrip', 'us-east-1', function (err) { | ||
if (err) return console.log(err) | ||
// Destination bucket | ||
const bucket = 'js-test-bucket' | ||
console.log('Bucket created successfully in "us-east-1".') | ||
// Destination object name | ||
const destinationObject = 'my-test-file.txt' | ||
var metaData = { | ||
'Content-Type': 'application/octet-stream', | ||
'X-Amz-Meta-Testing': 1234, | ||
example: 5678, | ||
} | ||
// Using fPutObject API upload your file to the bucket europetrip. | ||
minioClient.fPutObject('europetrip', 'photos-europe.tar', file, metaData, function (err, etag) { | ||
if (err) return console.log(err) | ||
console.log('File uploaded successfully.') | ||
}) | ||
}) | ||
// Check if the bucket exists | ||
// If it doesn't, create it | ||
const exists = await minioClient.bucketExists(bucket) | ||
if (exists) { | ||
console.log('Bucket ' + bucket + ' exists.') | ||
} else { | ||
await minioClient.makeBucket(bucket, 'us-east-1') | ||
console.log('Bucket ' + bucket + ' created in "us-east-1".') | ||
} | ||
// Set the object metadata | ||
var metaData = { | ||
'Content-Type': 'text/plain', | ||
'X-Amz-Meta-Testing': 1234, | ||
example: 5678, | ||
} | ||
// Upload the file with fPutObject | ||
// If an object with the same name exists, | ||
// it is updated with new data | ||
await minioClient.fPutObject(bucket, destinationObject, sourceFile, metaData) | ||
console.log('File ' + sourceFile + ' uploaded as object ' + destinationObject + ' in bucket ' + bucket) | ||
``` | ||
#### Run file-uploader | ||
#### Run the File Uploader | ||
```sh | ||
node file-uploader.js | ||
Bucket created successfully in "us-east-1". | ||
node file-uploader.mjs | ||
Bucket js-test-bucket created successfully in "us-east-1". | ||
File /tmp/test-file.txt uploaded successfully as my-test-file.txt to bucket js-test-bucket | ||
``` | ||
mc ls play/europetrip/ | ||
[2016-05-25 23:49:50 PDT] 17MiB photos-europe.tar | ||
Verify the object was created with [`mc`](https://min.io/docs/minio/linux/reference/minio-mc.html): | ||
``` | ||
mc ls play/js-test-bucket | ||
[2023-11-10 17:52:20 UTC] 20KiB STANDARD my-test-file.txt | ||
``` | ||
## API Reference | ||
The full API Reference is available here. | ||
The complete API Reference is available here: | ||
- [Complete API Reference](https://min.io/docs/minio/linux/developers/javascript/API.html) | ||
- [MinIO JavaScript API Reference](https://min.io/docs/minio/linux/developers/javascript/API.html) | ||
### API Reference : Bucket Operations | ||
### Bucket Operations | ||
@@ -136,3 +158,3 @@ - [`makeBucket`](https://min.io/docs/minio/linux/developers/javascript/API.html#makeBucket) | ||
### API Reference : File Object Operations | ||
### File Object Operations | ||
@@ -142,3 +164,3 @@ - [`fPutObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#fPutObject) | ||
### API Reference : Object Operations | ||
### Object Operations | ||
@@ -154,3 +176,3 @@ - [`getObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#getObject) | ||
### API Reference : Presigned Operations | ||
### Presigned Operations | ||
@@ -161,3 +183,3 @@ - [`presignedGetObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#presignedGetObject) | ||
### API Reference : Bucket Notification Operations | ||
### Bucket Notification Operations | ||
@@ -169,3 +191,3 @@ - [`getBucketNotification`](https://min.io/docs/minio/linux/developers/javascript/API.html#getBucketNotification) | ||
### API Reference : Bucket Policy Operations | ||
### Bucket Policy Operations | ||
@@ -175,5 +197,5 @@ - [`getBucketPolicy`](https://min.io/docs/minio/linux/developers/javascript/API.html#getBucketPolicy) | ||
## Full Examples | ||
## Examples | ||
#### Full Examples : Bucket Operations | ||
#### Bucket Operations | ||
@@ -184,31 +206,37 @@ - [list-buckets.mjs](https://github.com/minio/minio-js/blob/master/examples/list-buckets.mjs) | ||
- [list-objects-v2-with-metadata.js](https://github.com/minio/minio-js/blob/master/examples/list-objects-v2-with-metadata.js) (Extension) | ||
- [bucket-exists.js](https://github.com/minio/minio-js/blob/master/examples/bucket-exists.js) | ||
- [bucket-exists.mjs](https://github.com/minio/minio-js/blob/master/examples/bucket-exists.mjs) | ||
- [make-bucket.js](https://github.com/minio/minio-js/blob/master/examples/make-bucket.js) | ||
- [remove-bucket.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket.mjs) | ||
- [list-incomplete-uploads.js](https://github.com/minio/minio-js/blob/master/examples/list-incomplete-uploads.js) | ||
- [get-bucket-versioning.js](https://github.com/minio/minio-js/blob/master/examples/get-bucket-versioning.js) | ||
- [set-bucket-versioning.js](https://github.com/minio/minio-js/blob/master/examples/set-bucket-versioning.js) | ||
- [set-bucket-tagging.js](https://github.com/minio/minio-js/blob/master/examples/set-bucket-tagging.js) | ||
- [get-bucket-tagging.js](https://github.com/minio/minio-js/blob/master/examples/get-bucket-tagging.js) | ||
- [remove-bucket-tagging.js](https://github.com/minio/minio-js/blob/master/examples/remove-bucket-tagging.js) | ||
- [set-bucket-lifecycle.js](https://github.com/minio/minio-js/blob/master/examples/set-bucket-lifecycle.js) | ||
- [get-bucket-lifecycle.js](https://github.com/minio/minio-js/blob/master/examples/get-bucket-lifecycle.js) | ||
- [remove-bucket-lifecycle.js](https://github.com/minio/minio-js/blob/master/examples/remove-bucket-lifecycle.js) | ||
- [get-object-lock-config.js](https://github.com/minio/minio-js/blob/master/examples/get-object-lock-config.js) | ||
- [set-object-lock-config.js](https://github.com/minio/minio-js/blob/master/examples/set-object-lock-config.js) | ||
- [get-bucket-versioning.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-versioning.js) | ||
- [set-bucket-versioning.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-versioning.js) | ||
- [set-bucket-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-tagging.js) | ||
- [get-bucket-versioning.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-versioning.js) | ||
- [set-bucket-versioning.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-versioning.js) | ||
- [set-bucket-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-tagging.js) | ||
- [get-bucket-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-tagging.mjs) | ||
- [remove-bucket-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket-tagging.js) | ||
- [set-bucket-lifecycle.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-lifecycle.mjs) | ||
- [get-bucket-lifecycle.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-lifecycle.mjs) | ||
- [remove-bucket-lifecycle.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket-lifecycle.mjs) | ||
- [get-object-lock-config.mjs](https://github.com/minio/minio-js/blob/master/examples/get-object-lock-config.mjs) | ||
- [set-object-lock-config.mjs](https://github.com/minio/minio-js/blob/master/examples/set-object-lock-config.mjs) | ||
- [set-bucket-replication.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-replication.mjs) | ||
- [get-bucket-replication.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-replication.mjs) | ||
- [remove-bucket-replication.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket-replication.mjs) | ||
- [set-bucket-encryption.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-encryption.mjs) | ||
- [get-bucket-encryption.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-encryption.mjs) | ||
- [remove-bucket-encryption.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket-encryption.mjs) | ||
#### Full Examples : File Object Operations | ||
#### File Object Operations | ||
- [fput-object.js](https://github.com/minio/minio-js/blob/master/examples/fput-object.js) | ||
- [fget-object.js](https://github.com/minio/minio-js/blob/master/examples/fget-object.js) | ||
- [fget-object.mjs](https://github.com/minio/minio-js/blob/master/examples/fget-object.mjs) | ||
#### Full Examples : Object Operations | ||
#### Object Operations | ||
- [put-object.js](https://github.com/minio/minio-js/blob/master/examples/put-object.js) | ||
- [get-object.js](https://github.com/minio/minio-js/blob/master/examples/get-object.js) | ||
- [get-object.mjs](https://github.com/minio/minio-js/blob/master/examples/get-object.mjs) | ||
- [copy-object.js](https://github.com/minio/minio-js/blob/master/examples/copy-object.js) | ||
- [get-partialobject.js](https://github.com/minio/minio-js/blob/master/examples/get-partialobject.js) | ||
- [get-partialobject.mjs](https://github.com/minio/minio-js/blob/master/examples/get-partialobject.mjs) | ||
- [remove-object.js](https://github.com/minio/minio-js/blob/master/examples/remove-object.js) | ||
@@ -219,11 +247,11 @@ - [remove-incomplete-upload.js](https://github.com/minio/minio-js/blob/master/examples/remove-incomplete-upload.js) | ||
- [put-object-retention.js](https://github.com/minio/minio-js/blob/master/examples/put-object-retention.js) | ||
- [put-object-tagging.js](https://github.com/minio/minio-js/blob/master/examples/put-object-tagging.js) | ||
- [get-object-tagging.js](https://github.com/minio/minio-js/blob/master/examples/get-object-tagging.js) | ||
- [remove-object-tagging.js](https://github.com/minio/minio-js/blob/master/examples/remove-object-tagging.js) | ||
- [set-object-legal-hold.js](https://github.com/minio/minio-js/blob/master/examples/set-object-legalhold.js) | ||
- [get-object-legal-hold.js](https://github.com/minio/minio-js/blob/master/examples/get-object-legal-hold.js) | ||
- [put-object-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/put-object-tagging.js) | ||
- [get-object-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/get-object-tagging.mjs) | ||
- [remove-object-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-object-tagging.js) | ||
- [set-object-legal-hold.js](https://github.com/minio/minio-js/blob/master/examples/set-object-legalhold.mjs) | ||
- [get-object-legal-hold.js](https://github.com/minio/minio-js/blob/master/examples/get-object-legal-hold.mjs) | ||
- [compose-object.js](https://github.com/minio/minio-js/blob/master/examples/compose-object.js) | ||
- [select-object-content.js](https://github.com/minio/minio-js/blob/master/examples/select-object-content.js) | ||
- [select-object-content.js](https://github.com/minio/minio-js/blob/master/examples/select-object-content.mjs) | ||
#### Full Examples : Presigned Operations | ||
#### Presigned Operations | ||
@@ -234,3 +262,3 @@ - [presigned-getobject.js](https://github.com/minio/minio-js/blob/master/examples/presigned-getobject.js) | ||
#### Full Examples: Bucket Notification Operations | ||
#### Bucket Notification Operations | ||
@@ -242,6 +270,6 @@ - [get-bucket-notification.js](https://github.com/minio/minio-js/blob/master/examples/get-bucket-notification.js) | ||
#### Full Examples: Bucket Policy Operations | ||
#### Bucket Policy Operations | ||
- [get-bucket-policy.js](https://github.com/minio/minio-js/blob/master/examples/get-bucket-policy.js) | ||
- [set-bucket-policy.js](https://github.com/minio/minio-js/blob/master/examples/set-bucket-policy.js) | ||
- [set-bucket-policy.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-policy.mjs) | ||
@@ -256,8 +284,7 @@ ## Custom Settings | ||
- [MinIO JavaScript Client SDK API Reference](https://min.io/docs/minio/linux/developers/javascript/API.html) | ||
- [Build your own Shopping App Example- Full Application Example ](https://github.com/minio/minio-js-store-app) | ||
## Contribute | ||
[Contributors Guide](https://github.com/minio/minio-js/blob/master/CONTRIBUTING.md) | ||
- [Contributors Guide](https://github.com/minio/minio-js/blob/master/CONTRIBUTING.md) | ||
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/minio/minio-js/nodejs.yml) |
@@ -117,4 +117,5 @@ /* | ||
code?: string | ||
region?: string | ||
} | ||
export class IsValidBucketNameError extends ExtendableError {} |
@@ -25,2 +25,3 @@ /* | ||
import { fsp, fstat } from './async.ts' | ||
import type { Binary, Encryption, ObjectMetaData, RequestHeaders, ResponseHeader } from './type.ts' | ||
@@ -31,36 +32,18 @@ import { ENCRYPTION_TYPES } from './type.ts' | ||
/** | ||
* All characters in string which are NOT unreserved should be percent encoded. | ||
* Unreserved characters are : ALPHA / DIGIT / "-" / "." / "_" / "~" | ||
* Reference https://tools.ietf.org/html/rfc3986#section-2.2 | ||
*/ | ||
export function uriEscape(string: string) { | ||
return string.split('').reduce((acc: string, elem: string) => { | ||
const buf = Buffer.from(elem) | ||
if (buf.length === 1) { | ||
// length 1 indicates that elem is not a unicode character. | ||
// Check if it is an unreserved characer. | ||
if ( | ||
('A' <= elem && elem <= 'Z') || | ||
('a' <= elem && elem <= 'z') || | ||
('0' <= elem && elem <= '9') || | ||
elem === '_' || | ||
elem === '.' || | ||
elem === '~' || | ||
elem === '-' | ||
) { | ||
// Unreserved characer should not be encoded. | ||
acc = acc + elem | ||
return acc | ||
} | ||
} | ||
// elem needs encoding - i.e elem should be encoded if it's not unreserved | ||
// character or if it's a unicode character. | ||
for (const char of buf) { | ||
acc = acc + '%' + char.toString(16).toUpperCase() | ||
} | ||
return acc | ||
}, '') | ||
export function hashBinary(buf: Buffer, enableSHA256: boolean) { | ||
let sha256sum = '' | ||
if (enableSHA256) { | ||
sha256sum = crypto.createHash('sha256').update(buf).digest('hex') | ||
} | ||
const md5sum = crypto.createHash('md5').update(buf).digest('base64') | ||
return { md5sum, sha256sum } | ||
} | ||
// S3 percent-encodes some extra non-standard characters in a URI . So comply with S3. | ||
const encodeAsHex = (c: string) => `%${c.charCodeAt(0).toString(16).toUpperCase()}` | ||
export function uriEscape(uriStr: string): string { | ||
return encodeURIComponent(uriStr).replace(/[!'()*]/g, encodeAsHex) | ||
} | ||
export function uriResourceEscape(string: string) { | ||
@@ -130,5 +113,5 @@ return uriEscape(string).replace(/%2F/g, '/') | ||
const alphaNumerics = '`~!@#$%^&*()+={}[]|\\"\';:><?/' | ||
const nonAlphaNumerics = '`~!@#$%^&*()+={}[]|\\"\';:><?/' | ||
// All non alphanumeric characters are invalid. | ||
for (const char of alphaNumerics) { | ||
for (const char of nonAlphaNumerics) { | ||
if (host.includes(char)) { | ||
@@ -592,1 +575,27 @@ return false | ||
} | ||
/** | ||
* get content size of object content to upload | ||
*/ | ||
export async function getContentLength(s: stream.Readable | Buffer | string): Promise<number | null> { | ||
// use length property of string | Buffer | ||
if (typeof s === 'string' || Buffer.isBuffer(s)) { | ||
return s.length | ||
} | ||
// property of `fs.ReadStream` | ||
const filePath = (s as unknown as Record<string, unknown>).path as string | undefined | ||
if (filePath && typeof filePath === 'string') { | ||
const stat = await fsp.lstat(filePath) | ||
return stat.size | ||
} | ||
// property of `fs.ReadStream` | ||
const fd = (s as unknown as Record<string, unknown>).fd as number | null | undefined | ||
if (fd && typeof fd === 'number') { | ||
const stat = await fstat(fd) | ||
return stat.size | ||
} | ||
return null | ||
} |
import type * as http from 'node:http' | ||
import type { Readable as ReadableStream } from 'node:stream' | ||
export type VersionIdentificator = { | ||
versionId?: string | ||
} | ||
export type Binary = string | Buffer | ||
@@ -23,2 +27,3 @@ | ||
export type EnabledOrDisabledStatus = 'Enabled' | 'Disabled' | ||
export enum ENCRYPTION_TYPES { | ||
@@ -137,3 +142,3 @@ /** | ||
export type ReplicationRuleStatus = { | ||
Status: 'Enabled' | 'Disabled' | ||
Status: EnabledOrDisabledStatus | ||
} | ||
@@ -146,2 +151,4 @@ | ||
export type Tags = Record<string, string> | ||
export type ReplicationRuleDestination = { | ||
@@ -197,1 +204,185 @@ Bucket: string | ||
export type ResultCallback<T> = (error: Error | null, result: T) => void | ||
export type GetObjectLegalHoldOptions = { | ||
versionId: string | ||
} | ||
/** | ||
* @deprecated keep for backward compatible, use `LEGAL_HOLD_STATUS` instead | ||
*/ | ||
export type LegalHoldStatus = LEGAL_HOLD_STATUS | ||
export type PutObjectLegalHoldOptions = { | ||
versionId?: string | ||
status: LEGAL_HOLD_STATUS | ||
} | ||
export interface UploadedObjectInfo { | ||
etag: string | ||
versionId: string | null | ||
} | ||
export interface RetentionOptions { | ||
versionId: string | ||
mode?: RETENTION_MODES | ||
retainUntilDate?: IsoDate | ||
governanceBypass?: boolean | ||
} | ||
export type Retention = RetentionOptions | EmptyObject | ||
export type IsoDate = string | ||
export type EmptyObject = Record<string, never> | ||
export type ObjectLockInfo = | ||
| { | ||
objectLockEnabled: EnabledOrDisabledStatus | ||
mode: RETENTION_MODES | ||
unit: RETENTION_VALIDITY_UNITS | ||
validity: number | ||
} | ||
| EmptyObject | ||
export type ObjectLockConfigParam = { | ||
ObjectLockEnabled?: 'Enabled' | undefined | ||
Rule?: | ||
| { | ||
DefaultRetention: | ||
| { | ||
Mode: RETENTION_MODES | ||
Days: number | ||
Years: number | ||
} | ||
| EmptyObject | ||
} | ||
| EmptyObject | ||
} | ||
export type VersioningEnabled = 'Enabled' | ||
export type VersioningSuspended = 'Suspended' | ||
export type BucketVersioningConfiguration = { | ||
Status: VersioningEnabled | VersioningSuspended | ||
// TODO add ExcludedPrefixes, ExcludeFolders which are part of MinIO's extension, as an enhancement. | ||
} | ||
export type TaggingOpts = { | ||
versionId: string | ||
} | ||
export type PutTaggingParams = { | ||
bucketName: string | ||
objectName?: string | ||
tags: Tags | ||
putOpts?: TaggingOpts | ||
} | ||
export type RemoveTaggingParams = { | ||
bucketName: string | ||
objectName?: string | ||
removeOpts?: TaggingOpts | ||
} | ||
export type InputSerialization = { | ||
CompressionType?: 'NONE' | 'GZIP' | 'BZIP2' | ||
CSV?: { | ||
AllowQuotedRecordDelimiter?: boolean | ||
Comments?: string | ||
FieldDelimiter?: string | ||
FileHeaderInfo?: 'NONE' | 'IGNORE' | 'USE' | ||
QuoteCharacter?: string | ||
QuoteEscapeCharacter?: string | ||
RecordDelimiter?: string | ||
} | ||
JSON?: { | ||
Type: 'DOCUMENT' | 'LINES' | ||
} | ||
Parquet?: EmptyObject | ||
} | ||
export type OutputSerialization = { | ||
CSV?: { | ||
FieldDelimiter?: string | ||
QuoteCharacter?: string | ||
QuoteEscapeCharacter?: string | ||
QuoteFields?: string | ||
RecordDelimiter?: string | ||
} | ||
JSON?: { | ||
RecordDelimiter?: string | ||
} | ||
} | ||
export type SelectProgress = { Enabled: boolean } | ||
export type ScanRange = { Start: number; End: number } | ||
export type SelectOptions = { | ||
expression: string | ||
expressionType?: string | ||
inputSerialization: InputSerialization | ||
outputSerialization: OutputSerialization | ||
requestProgress?: SelectProgress | ||
scanRange?: ScanRange | ||
} | ||
export type Expiration = { | ||
Date: string | ||
Days: number | ||
DeleteMarker: boolean | ||
DeleteAll: boolean | ||
} | ||
export type RuleFilterAnd = { | ||
Prefix: string | ||
Tags: Tag[] | ||
} | ||
export type RuleFilter = { | ||
And?: RuleFilterAnd | ||
Prefix: string | ||
Tag?: Tag[] | ||
} | ||
export type NoncurrentVersionExpiration = { | ||
NoncurrentDays: number | ||
NewerNoncurrentVersions?: number | ||
} | ||
export type NoncurrentVersionTransition = { | ||
StorageClass: string | ||
NoncurrentDays?: number | ||
NewerNoncurrentVersions?: number | ||
} | ||
export type Transition = { | ||
Date?: string | ||
StorageClass: string | ||
Days: number | ||
} | ||
export type AbortIncompleteMultipartUpload = { | ||
DaysAfterInitiation: number | ||
} | ||
export type LifecycleRule = { | ||
AbortIncompleteMultipartUpload?: AbortIncompleteMultipartUpload | ||
ID: string | ||
Prefix?: string | ||
Status?: string | ||
Expiration?: Expiration | ||
RuleFilter?: RuleFilter | ||
NoncurrentVersionExpiration?: NoncurrentVersionExpiration | ||
NoncurrentVersionTransition?: NoncurrentVersionTransition | ||
Transition?: Transition | ||
} | ||
export type LifecycleConfig = { | ||
Rule: LifecycleRule[] | ||
} | ||
export type LifeCycleConfigParam = LifecycleConfig | null | undefined | '' | ||
export type ApplySSEByDefault = { | ||
KmsMasterKeyID?: string | ||
SSEAlgorithm: string | ||
} | ||
export type EncryptionRule = { | ||
ApplyServerSideEncryptionByDefault?: ApplySSEByDefault | ||
} | ||
export type EncryptionConfig = { | ||
Rule: EncryptionRule[] | ||
} |
import type * as http from 'node:http' | ||
import type stream from 'node:stream' | ||
import crc32 from 'buffer-crc32' | ||
import { XMLParser } from 'fast-xml-parser' | ||
import * as errors from '../errors.ts' | ||
import { parseXml, sanitizeETag, sanitizeObjectKey, toArray } from './helper.ts' | ||
import { SelectResults } from '../helpers.ts' | ||
import { isObject, parseXml, readableStream, sanitizeETag, sanitizeObjectKey, toArray } from './helper.ts' | ||
import { readAsString } from './response.ts' | ||
import type { BucketItemFromList, BucketItemWithMetadata, ReplicationConfig } from './type.ts' | ||
import type { BucketItemFromList, BucketItemWithMetadata, ObjectLockInfo, ReplicationConfig } from './type.ts' | ||
import { RETENTION_VALIDITY_UNITS } from './type.ts' | ||
@@ -149,3 +153,5 @@ // parse XML response for bucket region | ||
}> | ||
prefixes: { prefix: string }[] | ||
prefixes: { | ||
prefix: string | ||
}[] | ||
isTruncated: boolean | ||
@@ -170,3 +176,7 @@ nextKeyMarker: undefined | ||
let xmlobj = parseXml(xml) | ||
const result: { isTruncated: boolean; marker: number; parts: UploadedPart[] } = { | ||
const result: { | ||
isTruncated: boolean | ||
marker: number | ||
parts: UploadedPart[] | ||
} = { | ||
isTruncated: false, | ||
@@ -246,1 +256,298 @@ parts: [], | ||
} | ||
export function parseObjectLegalHoldConfig(xml: string) { | ||
const xmlObj = parseXml(xml) | ||
return xmlObj.LegalHold | ||
} | ||
export function parseTagging(xml: string) { | ||
const xmlObj = parseXml(xml) | ||
let result = [] | ||
if (xmlObj.Tagging && xmlObj.Tagging.TagSet && xmlObj.Tagging.TagSet.Tag) { | ||
const tagResult = xmlObj.Tagging.TagSet.Tag | ||
// if it is a single tag convert into an array so that the return value is always an array. | ||
if (isObject(tagResult)) { | ||
result.push(tagResult) | ||
} else { | ||
result = tagResult | ||
} | ||
} | ||
return result | ||
} | ||
// parse XML response when a multipart upload is completed | ||
export function parseCompleteMultipart(xml: string) { | ||
const xmlobj = parseXml(xml).CompleteMultipartUploadResult | ||
if (xmlobj.Location) { | ||
const location = toArray(xmlobj.Location)[0] | ||
const bucket = toArray(xmlobj.Bucket)[0] | ||
const key = xmlobj.Key | ||
const etag = xmlobj.ETag.replace(/^"/g, '') | ||
.replace(/"$/g, '') | ||
.replace(/^"/g, '') | ||
.replace(/"$/g, '') | ||
.replace(/^"/g, '') | ||
.replace(/"$/g, '') | ||
return { location, bucket, key, etag } | ||
} | ||
// Complete Multipart can return XML Error after a 200 OK response | ||
if (xmlobj.Code && xmlobj.Message) { | ||
const errCode = toArray(xmlobj.Code)[0] | ||
const errMessage = toArray(xmlobj.Message)[0] | ||
return { errCode, errMessage } | ||
} | ||
} | ||
type UploadID = string | ||
export type ListMultipartResult = { | ||
uploads: { | ||
key: string | ||
uploadId: UploadID | ||
initiator: unknown | ||
owner: unknown | ||
storageClass: unknown | ||
initiated: Date | ||
}[] | ||
prefixes: { | ||
prefix: string | ||
}[] | ||
isTruncated: boolean | ||
nextKeyMarker: string | ||
nextUploadIdMarker: string | ||
} | ||
// parse XML response for listing in-progress multipart uploads | ||
export function parseListMultipart(xml: string): ListMultipartResult { | ||
const result: ListMultipartResult = { | ||
prefixes: [], | ||
uploads: [], | ||
isTruncated: false, | ||
nextKeyMarker: '', | ||
nextUploadIdMarker: '', | ||
} | ||
let xmlobj = parseXml(xml) | ||
if (!xmlobj.ListMultipartUploadsResult) { | ||
throw new errors.InvalidXMLError('Missing tag: "ListMultipartUploadsResult"') | ||
} | ||
xmlobj = xmlobj.ListMultipartUploadsResult | ||
if (xmlobj.IsTruncated) { | ||
result.isTruncated = xmlobj.IsTruncated | ||
} | ||
if (xmlobj.NextKeyMarker) { | ||
result.nextKeyMarker = xmlobj.NextKeyMarker | ||
} | ||
if (xmlobj.NextUploadIdMarker) { | ||
result.nextUploadIdMarker = xmlobj.nextUploadIdMarker || '' | ||
} | ||
if (xmlobj.CommonPrefixes) { | ||
toArray(xmlobj.CommonPrefixes).forEach((prefix) => { | ||
// @ts-expect-error index check | ||
result.prefixes.push({ prefix: sanitizeObjectKey(toArray<string>(prefix.Prefix)[0]) }) | ||
}) | ||
} | ||
if (xmlobj.Upload) { | ||
toArray(xmlobj.Upload).forEach((upload) => { | ||
const key = upload.Key | ||
const uploadId = upload.UploadId | ||
const initiator = { id: upload.Initiator.ID, displayName: upload.Initiator.DisplayName } | ||
const owner = { id: upload.Owner.ID, displayName: upload.Owner.DisplayName } | ||
const storageClass = upload.StorageClass | ||
const initiated = new Date(upload.Initiated) | ||
result.uploads.push({ key, uploadId, initiator, owner, storageClass, initiated }) | ||
}) | ||
} | ||
return result | ||
} | ||
export function parseObjectLockConfig(xml: string): ObjectLockInfo { | ||
const xmlObj = parseXml(xml) | ||
let lockConfigResult = {} as ObjectLockInfo | ||
if (xmlObj.ObjectLockConfiguration) { | ||
lockConfigResult = { | ||
objectLockEnabled: xmlObj.ObjectLockConfiguration.ObjectLockEnabled, | ||
} as ObjectLockInfo | ||
let retentionResp | ||
if ( | ||
xmlObj.ObjectLockConfiguration && | ||
xmlObj.ObjectLockConfiguration.Rule && | ||
xmlObj.ObjectLockConfiguration.Rule.DefaultRetention | ||
) { | ||
retentionResp = xmlObj.ObjectLockConfiguration.Rule.DefaultRetention || {} | ||
lockConfigResult.mode = retentionResp.Mode | ||
} | ||
if (retentionResp) { | ||
const isUnitYears = retentionResp.Years | ||
if (isUnitYears) { | ||
lockConfigResult.validity = isUnitYears | ||
lockConfigResult.unit = RETENTION_VALIDITY_UNITS.YEARS | ||
} else { | ||
lockConfigResult.validity = retentionResp.Days | ||
lockConfigResult.unit = RETENTION_VALIDITY_UNITS.DAYS | ||
} | ||
} | ||
} | ||
return lockConfigResult | ||
} | ||
export function parseBucketVersioningConfig(xml: string) { | ||
const xmlObj = parseXml(xml) | ||
return xmlObj.VersioningConfiguration | ||
} | ||
// Used only in selectObjectContent API. | ||
// extractHeaderType extracts the first half of the header message, the header type. | ||
function extractHeaderType(stream: stream.Readable): string | undefined { | ||
const headerNameLen = Buffer.from(stream.read(1)).readUInt8() | ||
const headerNameWithSeparator = Buffer.from(stream.read(headerNameLen)).toString() | ||
const splitBySeparator = (headerNameWithSeparator || '').split(':') | ||
return splitBySeparator.length >= 1 ? splitBySeparator[1] : '' | ||
} | ||
function extractHeaderValue(stream: stream.Readable) { | ||
const bodyLen = Buffer.from(stream.read(2)).readUInt16BE() | ||
return Buffer.from(stream.read(bodyLen)).toString() | ||
} | ||
export function parseSelectObjectContentResponse(res: Buffer) { | ||
const selectResults = new SelectResults({}) // will be returned | ||
const responseStream = readableStream(res) // convert byte array to a readable responseStream | ||
// @ts-ignore | ||
while (responseStream._readableState.length) { | ||
// Top level responseStream read tracker. | ||
let msgCrcAccumulator // accumulate from start of the message till the message crc start. | ||
const totalByteLengthBuffer = Buffer.from(responseStream.read(4)) | ||
msgCrcAccumulator = crc32(totalByteLengthBuffer) | ||
const headerBytesBuffer = Buffer.from(responseStream.read(4)) | ||
msgCrcAccumulator = crc32(headerBytesBuffer, msgCrcAccumulator) | ||
const calculatedPreludeCrc = msgCrcAccumulator.readInt32BE() // use it to check if any CRC mismatch in header itself. | ||
const preludeCrcBuffer = Buffer.from(responseStream.read(4)) // read 4 bytes i.e 4+4 =8 + 4 = 12 ( prelude + prelude crc) | ||
msgCrcAccumulator = crc32(preludeCrcBuffer, msgCrcAccumulator) | ||
const totalMsgLength = totalByteLengthBuffer.readInt32BE() | ||
const headerLength = headerBytesBuffer.readInt32BE() | ||
const preludeCrcByteValue = preludeCrcBuffer.readInt32BE() | ||
if (preludeCrcByteValue !== calculatedPreludeCrc) { | ||
// Handle Header CRC mismatch Error | ||
throw new Error( | ||
`Header Checksum Mismatch, Prelude CRC of ${preludeCrcByteValue} does not equal expected CRC of ${calculatedPreludeCrc}`, | ||
) | ||
} | ||
const headers: Record<string, unknown> = {} | ||
if (headerLength > 0) { | ||
const headerBytes = Buffer.from(responseStream.read(headerLength)) | ||
msgCrcAccumulator = crc32(headerBytes, msgCrcAccumulator) | ||
const headerReaderStream = readableStream(headerBytes) | ||
// @ts-ignore | ||
while (headerReaderStream._readableState.length) { | ||
const headerTypeName = extractHeaderType(headerReaderStream) | ||
headerReaderStream.read(1) // just read and ignore it. | ||
if (headerTypeName) { | ||
headers[headerTypeName] = extractHeaderValue(headerReaderStream) | ||
} | ||
} | ||
} | ||
let payloadStream | ||
const payLoadLength = totalMsgLength - headerLength - 16 | ||
if (payLoadLength > 0) { | ||
const payLoadBuffer = Buffer.from(responseStream.read(payLoadLength)) | ||
msgCrcAccumulator = crc32(payLoadBuffer, msgCrcAccumulator) | ||
// read the checksum early and detect any mismatch so we can avoid unnecessary further processing. | ||
const messageCrcByteValue = Buffer.from(responseStream.read(4)).readInt32BE() | ||
const calculatedCrc = msgCrcAccumulator.readInt32BE() | ||
// Handle message CRC Error | ||
if (messageCrcByteValue !== calculatedCrc) { | ||
throw new Error( | ||
`Message Checksum Mismatch, Message CRC of ${messageCrcByteValue} does not equal expected CRC of ${calculatedCrc}`, | ||
) | ||
} | ||
payloadStream = readableStream(payLoadBuffer) | ||
} | ||
const messageType = headers['message-type'] | ||
switch (messageType) { | ||
case 'error': { | ||
const errorMessage = headers['error-code'] + ':"' + headers['error-message'] + '"' | ||
throw new Error(errorMessage) | ||
} | ||
case 'event': { | ||
const contentType = headers['content-type'] | ||
const eventType = headers['event-type'] | ||
switch (eventType) { | ||
case 'End': { | ||
selectResults.setResponse(res) | ||
return selectResults | ||
} | ||
case 'Records': { | ||
const readData = payloadStream?.read(payLoadLength) | ||
selectResults.setRecords(readData) | ||
break | ||
} | ||
case 'Progress': | ||
{ | ||
switch (contentType) { | ||
case 'text/xml': { | ||
const progressData = payloadStream?.read(payLoadLength) | ||
selectResults.setProgress(progressData.toString()) | ||
break | ||
} | ||
default: { | ||
const errorMessage = `Unexpected content-type ${contentType} sent for event-type Progress` | ||
throw new Error(errorMessage) | ||
} | ||
} | ||
} | ||
break | ||
case 'Stats': | ||
{ | ||
switch (contentType) { | ||
case 'text/xml': { | ||
const statsData = payloadStream?.read(payLoadLength) | ||
selectResults.setStats(statsData.toString()) | ||
break | ||
} | ||
default: { | ||
const errorMessage = `Unexpected content-type ${contentType} sent for event-type Stats` | ||
throw new Error(errorMessage) | ||
} | ||
} | ||
} | ||
break | ||
default: { | ||
// Continuation message: Not sure if it is supported. did not find a reference or any message in response. | ||
// It does not have a payload. | ||
const warningMessage = `Un implemented event detected ${messageType}.` | ||
// eslint-disable-next-line no-console | ||
console.warn(warningMessage) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
export function parseLifecycleConfig(xml: string) { | ||
const xmlObj = parseXml(xml) | ||
return xmlObj.LifecycleConfiguration | ||
} | ||
export function parseBucketEncryptionConfig(xml: string) { | ||
return parseXml(xml) | ||
} |
// imported from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/93cfb0ec069731dcdfc31464788613f7cddb8192/types/minio/index.d.ts | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { EventEmitter } from 'node:events' | ||
import type { Readable as ReadableStream } from 'node:stream' | ||
import type { | ||
@@ -18,3 +15,2 @@ CopyDestinationOptions, | ||
import { PostPolicy } from './internal/post-policy.ts' | ||
import type { Region } from './internal/s3-endpoints.ts' | ||
import type { | ||
@@ -27,7 +23,17 @@ BucketItem, | ||
BucketStream, | ||
EmptyObject, | ||
ExistingObjectReplication, | ||
GetObjectLegalHoldOptions, | ||
IncompleteUploadedBucketItem, | ||
InputSerialization, | ||
IsoDate, | ||
ItemBucketMetadata, | ||
ItemBucketMetadataList, | ||
LegalHoldStatus, | ||
LifecycleConfig, | ||
LifecycleRule, | ||
MetadataItem, | ||
ObjectLockInfo, | ||
OutputSerialization, | ||
PutObjectLegalHoldOptions, | ||
ReplicaModifications, | ||
@@ -42,9 +48,20 @@ ReplicationConfig, | ||
ResultCallback, | ||
Retention, | ||
RetentionOptions, | ||
ScanRange, | ||
SelectOptions, | ||
SelectProgress, | ||
SourceSelectionCriteria, | ||
Tag, | ||
VersionIdentificator, | ||
} from './internal/type.ts' | ||
import type { NotificationConfig, NotificationEvent, NotificationPoller } from './notification.ts' | ||
export * from './errors.ts' | ||
export * from './helpers.ts' | ||
export type { Region } from './internal/s3-endpoints.ts' | ||
export type * from './notification.ts' | ||
export * from './notification.ts' | ||
export { CopyConditions, PostPolicy } | ||
export type { MakeBucketOpt } from './internal/client.ts' | ||
export type { | ||
@@ -58,8 +75,18 @@ BucketItem, | ||
ClientOptions, | ||
EmptyObject, | ||
ExistingObjectReplication, | ||
GetObjectLegalHoldOptions, | ||
IncompleteUploadedBucketItem, | ||
InputSerialization, | ||
IsoDate, | ||
ItemBucketMetadata, | ||
ItemBucketMetadataList, | ||
LegalHoldStatus, | ||
LifecycleConfig, | ||
LifecycleRule, | ||
MetadataItem, | ||
NoResultCallback, | ||
ObjectLockInfo, | ||
OutputSerialization, | ||
PutObjectLegalHoldOptions, | ||
RemoveOptions, | ||
@@ -74,2 +101,7 @@ ReplicaModifications, | ||
ReplicationRuleStatus, | ||
Retention, | ||
RetentionOptions, | ||
ScanRange, | ||
SelectOptions, | ||
SelectProgress, | ||
SourceSelectionCriteria, | ||
@@ -79,22 +111,2 @@ Tag, | ||
// Exports only from typings | ||
export type NotificationEvent = | ||
| 's3:ObjectCreated:*' | ||
| 's3:ObjectCreated:Put' | ||
| 's3:ObjectCreated:Post' | ||
| 's3:ObjectCreated:Copy' | ||
| 's3:ObjectCreated:CompleteMultipartUpload' | ||
| 's3:ObjectRemoved:*' | ||
| 's3:ObjectRemoved:Delete' | ||
| 's3:ObjectRemoved:DeleteMarkerCreated' | ||
| 's3:ReducedRedundancyLostObject' | ||
| 's3:TestEvent' | ||
| 's3:ObjectRestore:Post' | ||
| 's3:ObjectRestore:Completed' | ||
| 's3:Replication:OperationFailedReplication' | ||
| 's3:Replication:OperationMissedThreshold' | ||
| 's3:Replication:OperationReplicatedAfterThreshold' | ||
| 's3:Replication:OperationNotTracked' | ||
| string | ||
/** | ||
@@ -110,15 +122,4 @@ * @deprecated keep for backward compatible, use `RETENTION_MODES` instead | ||
/** | ||
* @deprecated keep for backward compatible | ||
*/ | ||
export type LegalHoldStatus = LEGAL_HOLD_STATUS | ||
export type VersioningConfig = Record<string | number | symbol, unknown> | ||
export type TagList = Record<string, string> | ||
export type EmptyObject = Record<string, never> | ||
export type VersionIdentificator = Pick<RetentionOptions, 'versionId'> | ||
export type Lifecycle = LifecycleConfig | null | '' | ||
export type Lock = LockConfig | EmptyObject | ||
export type Encryption = EncryptionConfig | EmptyObject | ||
export type Retention = RetentionOptions | EmptyObject | ||
export type IsoDate = string | ||
@@ -132,15 +133,2 @@ export interface PostPolicyResult { | ||
export interface UploadedObjectInfo { | ||
etag: string | ||
versionId: string | null | ||
} | ||
export interface LifecycleConfig { | ||
Rule: LifecycleRule[] | ||
} | ||
export interface LifecycleRule { | ||
[key: string]: any | ||
} | ||
export interface LockConfig { | ||
@@ -152,17 +140,2 @@ mode: RETENTION_MODES | ||
export interface EncryptionConfig { | ||
Rule: EncryptionRule[] | ||
} | ||
export interface EncryptionRule { | ||
[key: string]: any | ||
} | ||
export interface RetentionOptions { | ||
versionId: string | ||
mode?: RETENTION_MODES | ||
retainUntilDate?: IsoDate | ||
governanceBypass?: boolean | ||
} | ||
export interface LegalHoldOptions { | ||
@@ -173,41 +146,2 @@ versionId: string | ||
export interface InputSerialization { | ||
CompressionType?: 'NONE' | 'GZIP' | 'BZIP2' | ||
CSV?: { | ||
AllowQuotedRecordDelimiter?: boolean | ||
Comments?: string | ||
FieldDelimiter?: string | ||
FileHeaderInfo?: 'NONE' | 'IGNORE' | 'USE' | ||
QuoteCharacter?: string | ||
QuoteEscapeCharacter?: string | ||
RecordDelimiter?: string | ||
} | ||
JSON?: { | ||
Type: 'DOCUMENT' | 'LINES' | ||
} | ||
Parquet?: EmptyObject | ||
} | ||
export interface OutputSerialization { | ||
CSV?: { | ||
FieldDelimiter?: string | ||
QuoteCharacter?: string | ||
QuoteEscapeCharacter?: string | ||
QuoteFields?: string | ||
RecordDelimiter?: string | ||
} | ||
JSON?: { | ||
RecordDelimiter?: string | ||
} | ||
} | ||
export interface SelectOptions { | ||
expression: string | ||
expressionType?: string | ||
inputSerialization: InputSerialization | ||
outputSerialization: OutputSerialization | ||
requestProgress?: { Enabled: boolean } | ||
scanRange?: { Start: number; End: number } | ||
} | ||
export interface SourceObjectStats { | ||
@@ -221,28 +155,4 @@ size: number | ||
// No need to export this. But without it - linter error. | ||
export class TargetConfig { | ||
setId(id: unknown): void | ||
addEvent(newEvent: unknown): void | ||
addFilterSuffix(suffix: string): void | ||
addFilterPrefix(prefix: string): void | ||
} | ||
export interface MakeBucketOpt { | ||
ObjectLocking: boolean | ||
} | ||
// Exports from library | ||
export class Client extends TypedClient { | ||
// Bucket operations | ||
makeBucket(bucketName: string, region: Region, makeOpts: MakeBucketOpt, callback: NoResultCallback): void | ||
makeBucket(bucketName: string, region: Region, callback: NoResultCallback): void | ||
makeBucket(bucketName: string, callback: NoResultCallback): void | ||
makeBucket(bucketName: string, region?: Region, makeOpts?: MakeBucketOpt): Promise<void> | ||
bucketExists(bucketName: string, callback: ResultCallback<boolean>): void | ||
bucketExists(bucketName: string): Promise<boolean> | ||
listObjects(bucketName: string, prefix?: string, recursive?: boolean): BucketStream<BucketItem> | ||
@@ -252,119 +162,2 @@ | ||
listIncompleteUploads( | ||
bucketName: string, | ||
prefix?: string, | ||
recursive?: boolean, | ||
): BucketStream<IncompleteUploadedBucketItem> | ||
getBucketVersioning(bucketName: string, callback: ResultCallback<VersioningConfig>): void | ||
getBucketVersioning(bucketName: string): Promise<VersioningConfig> | ||
setBucketVersioning(bucketName: string, versioningConfig: any, callback: NoResultCallback): void | ||
setBucketVersioning(bucketName: string, versioningConfig: any): Promise<void> | ||
getBucketTagging(bucketName: string, callback: ResultCallback<Tag[]>): void | ||
getBucketTagging(bucketName: string): Promise<Tag[]> | ||
setBucketTagging(bucketName: string, tags: TagList, callback: NoResultCallback): void | ||
setBucketTagging(bucketName: string, tags: TagList): Promise<void> | ||
removeBucketTagging(bucketName: string, callback: NoResultCallback): void | ||
removeBucketTagging(bucketName: string): Promise<void> | ||
setBucketLifecycle(bucketName: string, lifecycleConfig: Lifecycle, callback: NoResultCallback): void | ||
setBucketLifecycle(bucketName: string, lifecycleConfig: Lifecycle): Promise<void> | ||
getBucketLifecycle(bucketName: string, callback: ResultCallback<Lifecycle>): void | ||
getBucketLifecycle(bucketName: string): Promise<Lifecycle> | ||
removeBucketLifecycle(bucketName: string, callback: NoResultCallback): void | ||
removeBucketLifecycle(bucketName: string): Promise<void> | ||
setObjectLockConfig(bucketName: string, callback: NoResultCallback): void | ||
setObjectLockConfig(bucketName: string, lockConfig: Lock, callback: NoResultCallback): void | ||
setObjectLockConfig(bucketName: string, lockConfig?: Lock): Promise<void> | ||
getObjectLockConfig(bucketName: string, callback: ResultCallback<Lock>): void | ||
getObjectLockConfig(bucketName: string): Promise<Lock> | ||
getBucketEncryption(bucketName: string, callback: ResultCallback<Encryption>): void | ||
getBucketEncryption(bucketName: string): Promise<Encryption> | ||
setBucketEncryption(bucketName: string, encryptionConfig: Encryption, callback: NoResultCallback): void | ||
setBucketEncryption(bucketName: string, encryptionConfig: Encryption): Promise<void> | ||
removeBucketEncryption(bucketName: string, callback: NoResultCallback): void | ||
removeBucketEncryption(bucketName: string): Promise<void> | ||
// Object operations | ||
getObject(bucketName: string, objectName: string, callback: ResultCallback<ReadableStream>): void | ||
getObject(bucketName: string, objectName: string): Promise<ReadableStream> | ||
getPartialObject( | ||
bucketName: string, | ||
objectName: string, | ||
offset: number, | ||
callback: ResultCallback<ReadableStream>, | ||
): void | ||
getPartialObject( | ||
bucketName: string, | ||
objectName: string, | ||
offset: number, | ||
length: number, | ||
callback: ResultCallback<ReadableStream>, | ||
): void | ||
getPartialObject(bucketName: string, objectName: string, offset: number, length?: number): Promise<ReadableStream> | ||
fGetObject(bucketName: string, objectName: string, filePath: string, callback: NoResultCallback): void | ||
fGetObject(bucketName: string, objectName: string, filePath: string): Promise<void> | ||
putObject( | ||
bucketName: string, | ||
objectName: string, | ||
stream: ReadableStream | Buffer | string, | ||
callback: ResultCallback<UploadedObjectInfo>, | ||
): void | ||
putObject( | ||
bucketName: string, | ||
objectName: string, | ||
stream: ReadableStream | Buffer | string, | ||
size: number, | ||
callback: ResultCallback<UploadedObjectInfo>, | ||
): void | ||
putObject( | ||
bucketName: string, | ||
objectName: string, | ||
stream: ReadableStream | Buffer | string, | ||
size: number, | ||
metaData: ItemBucketMetadata, | ||
callback: ResultCallback<UploadedObjectInfo>, | ||
): void | ||
putObject( | ||
bucketName: string, | ||
objectName: string, | ||
stream: ReadableStream | Buffer | string, | ||
size?: number, | ||
metaData?: ItemBucketMetadata, | ||
): Promise<UploadedObjectInfo> | ||
putObject( | ||
bucketName: string, | ||
objectName: string, | ||
stream: ReadableStream | Buffer | string, | ||
metaData?: ItemBucketMetadata, | ||
): Promise<UploadedObjectInfo> | ||
fPutObject( | ||
bucketName: string, | ||
objectName: string, | ||
filePath: string, | ||
metaData: ItemBucketMetadata, | ||
callback: ResultCallback<UploadedObjectInfo>, | ||
): void | ||
fPutObject( | ||
bucketName: string, | ||
objectName: string, | ||
filePath: string, | ||
metaData?: ItemBucketMetadata, | ||
): Promise<UploadedObjectInfo> | ||
copyObject( | ||
@@ -390,11 +183,2 @@ bucketName: string, | ||
putObjectRetention(bucketName: string, objectName: string, callback: NoResultCallback): void | ||
putObjectRetention( | ||
bucketName: string, | ||
objectName: string, | ||
retentionOptions: Retention, | ||
callback: NoResultCallback, | ||
): void | ||
putObjectRetention(bucketName: string, objectName: string, retentionOptions?: Retention): Promise<void> | ||
getObjectRetention( | ||
@@ -408,57 +192,2 @@ bucketName: string, | ||
setObjectTagging(bucketName: string, objectName: string, tags: TagList, callback: NoResultCallback): void | ||
setObjectTagging( | ||
bucketName: string, | ||
objectName: string, | ||
tags: TagList, | ||
putOptions: VersionIdentificator, | ||
callback: NoResultCallback, | ||
): void | ||
setObjectTagging( | ||
bucketName: string, | ||
objectName: string, | ||
tags: TagList, | ||
putOptions?: VersionIdentificator, | ||
): Promise<void> | ||
removeObjectTagging(bucketName: string, objectName: string, callback: NoResultCallback): void | ||
removeObjectTagging( | ||
bucketName: string, | ||
objectName: string, | ||
removeOptions: VersionIdentificator, | ||
callback: NoResultCallback, | ||
): void | ||
removeObjectTagging(bucketName: string, objectName: string, removeOptions?: VersionIdentificator): Promise<void> | ||
getObjectTagging(bucketName: string, objectName: string, callback: ResultCallback<Tag[]>): void | ||
getObjectTagging( | ||
bucketName: string, | ||
objectName: string, | ||
getOptions: VersionIdentificator, | ||
callback: ResultCallback<Tag[]>, | ||
): void | ||
getObjectTagging(bucketName: string, objectName: string, getOptions?: VersionIdentificator): Promise<Tag[]> | ||
getObjectLegalHold(bucketName: string, objectName: string, callback: ResultCallback<LegalHoldOptions>): void | ||
getObjectLegalHold( | ||
bucketName: string, | ||
objectName: string, | ||
getOptions: VersionIdentificator, | ||
callback: ResultCallback<LegalHoldOptions>, | ||
): void | ||
getObjectLegalHold( | ||
bucketName: string, | ||
objectName: string, | ||
getOptions?: VersionIdentificator, | ||
): Promise<LegalHoldOptions> | ||
setObjectLegalHold(bucketName: string, objectName: string, callback: NoResultCallback): void | ||
setObjectLegalHold( | ||
bucketName: string, | ||
objectName: string, | ||
setOptions: LegalHoldOptions, | ||
callback: NoResultCallback, | ||
): void | ||
setObjectLegalHold(bucketName: string, objectName: string, setOptions?: LegalHoldOptions): Promise<void> | ||
composeObject( | ||
@@ -471,10 +200,2 @@ destObjConfig: CopyDestinationOptions, | ||
selectObjectContent( | ||
bucketName: string, | ||
objectName: string, | ||
selectOpts: SelectOptions, | ||
callback: NoResultCallback, | ||
): void | ||
selectObjectContent(bucketName: string, objectName: string, selectOpts: SelectOptions): Promise<void> | ||
// Presigned operations | ||
@@ -561,8 +282,2 @@ presignedUrl(httpMethod: string, bucketName: string, objectName: string, callback: ResultCallback<string>): void | ||
getBucketPolicy(bucketName: string, callback: ResultCallback<string>): void | ||
getBucketPolicy(bucketName: string): Promise<string> | ||
setBucketPolicy(bucketName: string, bucketPolicy: string, callback: NoResultCallback): void | ||
setBucketPolicy(bucketName: string, bucketPolicy: string): Promise<void> | ||
listenBucketNotification( | ||
@@ -578,44 +293,1 @@ bucketName: string, | ||
} | ||
export declare class NotificationPoller extends EventEmitter { | ||
stop(): void | ||
start(): void | ||
// must to be public? | ||
checkForChanges(): void | ||
} | ||
export declare class NotificationConfig { | ||
add(target: TopicConfig | QueueConfig | CloudFunctionConfig): void | ||
} | ||
export declare class TopicConfig extends TargetConfig { | ||
constructor(arn: string) | ||
} | ||
export declare class QueueConfig extends TargetConfig { | ||
constructor(arn: string) | ||
} | ||
export declare class CloudFunctionConfig extends TargetConfig { | ||
constructor(arn: string) | ||
} | ||
export declare function buildARN( | ||
partition: string, | ||
service: string, | ||
region: string, | ||
accountId: string, | ||
resource: string, | ||
): string | ||
export declare const ObjectCreatedAll: NotificationEvent // s3:ObjectCreated:*' | ||
export declare const ObjectCreatedPut: NotificationEvent // s3:ObjectCreated:Put | ||
export declare const ObjectCreatedPost: NotificationEvent // s3:ObjectCreated:Post | ||
export declare const ObjectCreatedCopy: NotificationEvent // s3:ObjectCreated:Copy | ||
export declare const ObjectCreatedCompleteMultipartUpload: NotificationEvent // s3:ObjectCreated:CompleteMultipartUpload | ||
export declare const ObjectRemovedAll: NotificationEvent // s3:ObjectRemoved:* | ||
export declare const ObjectRemovedDelete: NotificationEvent // s3:ObjectRemoved:Delete | ||
export declare const ObjectRemovedDeleteMarkerCreated: NotificationEvent // s3:ObjectRemoved:DeleteMarkerCreated | ||
export declare const ObjectReducedRedundancyLostObject: NotificationEvent // s3:ReducedRedundancyLostObject |
@@ -19,3 +19,2 @@ /* | ||
import JSONParser from 'json-stream' | ||
import Through2 from 'through2' | ||
@@ -105,7 +104,2 @@ | ||
// Parses listMultipartUploads response. | ||
export function getListMultipartTransformer() { | ||
return getConcater(xmlParsers.parseListMultipart) | ||
} | ||
// Parses listObjects response. | ||
@@ -126,7 +120,2 @@ export function getListObjectsTransformer() { | ||
// Parses completeMultipartUpload response. | ||
export function getCompleteMultipartTransformer() { | ||
return getConcater(xmlParsers.parseCompleteMultipart) | ||
} | ||
// Parses GET/SET BucketNotification response | ||
@@ -137,30 +126,5 @@ export function getBucketNotificationTransformer() { | ||
// Parses a notification. | ||
export function getNotificationTransformer() { | ||
// This will parse and return each object. | ||
return new JSONParser() | ||
} | ||
export function bucketVersioningTransformer() { | ||
return getConcater(xmlParsers.parseBucketVersioningConfig) | ||
} | ||
export function getTagsTransformer() { | ||
return getConcater(xmlParsers.parseTagging) | ||
} | ||
export function lifecycleTransformer() { | ||
return getConcater(xmlParsers.parseLifecycleConfig) | ||
} | ||
export function objectLockTransformer() { | ||
return getConcater(xmlParsers.parseObjectLockConfig) | ||
} | ||
export function objectRetentionTransformer() { | ||
return getConcater(xmlParsers.parseObjectRetentionConfig) | ||
} | ||
export function bucketEncryptionTransformer() { | ||
return getConcater(xmlParsers.parseBucketEncryptionConfig) | ||
} | ||
@@ -174,5 +138,2 @@ export function objectLegalHoldTransformer() { | ||
} | ||
export function selectObjectContentTransformer() { | ||
return getConcater() | ||
} | ||
@@ -179,0 +140,0 @@ export function removeObjectsTransformer() { |
@@ -17,17 +17,6 @@ /* | ||
import crc32 from 'buffer-crc32' | ||
import { XMLParser } from 'fast-xml-parser' | ||
import * as errors from './errors.ts' | ||
import { SelectResults } from './helpers.ts' | ||
import { | ||
isObject, | ||
parseXml, | ||
readableStream, | ||
sanitizeETag, | ||
sanitizeObjectKey, | ||
sanitizeSize, | ||
toArray, | ||
} from './internal/helper.ts' | ||
import { RETENTION_VALIDITY_UNITS } from './internal/type.ts' | ||
import { isObject, parseXml, sanitizeETag, sanitizeObjectKey, sanitizeSize, toArray } from './internal/helper.ts' | ||
@@ -67,48 +56,2 @@ const fxpWithoutNumParser = new XMLParser({ | ||
// parse XML response for listing in-progress multipart uploads | ||
export function parseListMultipart(xml) { | ||
var result = { | ||
uploads: [], | ||
prefixes: [], | ||
isTruncated: false, | ||
} | ||
var xmlobj = parseXml(xml) | ||
if (!xmlobj.ListMultipartUploadsResult) { | ||
throw new errors.InvalidXMLError('Missing tag: "ListMultipartUploadsResult"') | ||
} | ||
xmlobj = xmlobj.ListMultipartUploadsResult | ||
if (xmlobj.IsTruncated) { | ||
result.isTruncated = xmlobj.IsTruncated | ||
} | ||
if (xmlobj.NextKeyMarker) { | ||
result.nextKeyMarker = xmlobj.NextKeyMarker | ||
} | ||
if (xmlobj.NextUploadIdMarker) { | ||
result.nextUploadIdMarker = xmlobj.nextUploadIdMarker || '' | ||
} | ||
if (xmlobj.CommonPrefixes) { | ||
toArray(xmlobj.CommonPrefixes).forEach((prefix) => { | ||
result.prefixes.push({ prefix: sanitizeObjectKey(toArray(prefix.Prefix)[0]) }) | ||
}) | ||
} | ||
if (xmlobj.Upload) { | ||
toArray(xmlobj.Upload).forEach((upload) => { | ||
var key = upload.Key | ||
var uploadId = upload.UploadId | ||
var initiator = { id: upload.Initiator.ID, displayName: upload.Initiator.DisplayName } | ||
var owner = { id: upload.Owner.ID, displayName: upload.Owner.DisplayName } | ||
var storageClass = upload.StorageClass | ||
var initiated = new Date(upload.Initiated) | ||
result.uploads.push({ key, uploadId, initiator, owner, storageClass, initiated }) | ||
}) | ||
} | ||
return result | ||
} | ||
// parse XML response to list all the owned buckets | ||
// parse XML response for bucket notification | ||
@@ -187,26 +130,2 @@ export function parseBucketNotification(xml) { | ||
// parse XML response when a multipart upload is completed | ||
export function parseCompleteMultipart(xml) { | ||
var xmlobj = parseXml(xml).CompleteMultipartUploadResult | ||
if (xmlobj.Location) { | ||
var location = toArray(xmlobj.Location)[0] | ||
var bucket = toArray(xmlobj.Bucket)[0] | ||
var key = xmlobj.Key | ||
var etag = xmlobj.ETag.replace(/^"/g, '') | ||
.replace(/"$/g, '') | ||
.replace(/^"/g, '') | ||
.replace(/"$/g, '') | ||
.replace(/^"/g, '') | ||
.replace(/"$/g, '') | ||
return { location, bucket, key, etag } | ||
} | ||
// Complete Multipart can return XML Error after a 200 OK response | ||
if (xmlobj.Code && xmlobj.Message) { | ||
var errCode = toArray(xmlobj.Code)[0] | ||
var errMessage = toArray(xmlobj.Message)[0] | ||
return { errCode, errMessage } | ||
} | ||
} | ||
const formatObjInfo = (content, opts = {}) => { | ||
@@ -272,2 +191,4 @@ let { Key, LastModified, ETag, Size, VersionId, IsLatest } = content | ||
nextMarker = listBucketResult.NextMarker | ||
} else if (isTruncated && result.objects.length > 0) { | ||
nextMarker = result.objects[result.objects.length - 1].name | ||
} | ||
@@ -385,57 +306,2 @@ parseCommonPrefixesEntity(listBucketResult.CommonPrefixes) | ||
export function parseBucketVersioningConfig(xml) { | ||
var xmlObj = parseXml(xml) | ||
return xmlObj.VersioningConfiguration | ||
} | ||
export function parseTagging(xml) { | ||
const xmlObj = parseXml(xml) | ||
let result = [] | ||
if (xmlObj.Tagging && xmlObj.Tagging.TagSet && xmlObj.Tagging.TagSet.Tag) { | ||
const tagResult = xmlObj.Tagging.TagSet.Tag | ||
// if it is a single tag convert into an array so that the return value is always an array. | ||
if (isObject(tagResult)) { | ||
result.push(tagResult) | ||
} else { | ||
result = tagResult | ||
} | ||
} | ||
return result | ||
} | ||
export function parseLifecycleConfig(xml) { | ||
const xmlObj = parseXml(xml) | ||
return xmlObj.LifecycleConfiguration | ||
} | ||
export function parseObjectLockConfig(xml) { | ||
const xmlObj = parseXml(xml) | ||
let lockConfigResult = {} | ||
if (xmlObj.ObjectLockConfiguration) { | ||
lockConfigResult = { | ||
objectLockEnabled: xmlObj.ObjectLockConfiguration.ObjectLockEnabled, | ||
} | ||
let retentionResp | ||
if ( | ||
xmlObj.ObjectLockConfiguration && | ||
xmlObj.ObjectLockConfiguration.Rule && | ||
xmlObj.ObjectLockConfiguration.Rule.DefaultRetention | ||
) { | ||
retentionResp = xmlObj.ObjectLockConfiguration.Rule.DefaultRetention || {} | ||
lockConfigResult.mode = retentionResp.Mode | ||
} | ||
if (retentionResp) { | ||
const isUnitYears = retentionResp.Years | ||
if (isUnitYears) { | ||
lockConfigResult.validity = isUnitYears | ||
lockConfigResult.unit = RETENTION_VALIDITY_UNITS.YEARS | ||
} else { | ||
lockConfigResult.validity = retentionResp.Days | ||
lockConfigResult.unit = RETENTION_VALIDITY_UNITS.DAYS | ||
} | ||
} | ||
return lockConfigResult | ||
} | ||
} | ||
export function parseObjectRetentionConfig(xml) { | ||
@@ -451,7 +317,2 @@ const xmlObj = parseXml(xml) | ||
export function parseBucketEncryptionConfig(xml) { | ||
let encConfig = parseXml(xml) | ||
return encConfig | ||
} | ||
export function parseObjectLegalHoldConfig(xml) { | ||
@@ -476,141 +337,1 @@ const xmlObj = parseXml(xml) | ||
} | ||
export function parseSelectObjectContentResponse(res) { | ||
// extractHeaderType extracts the first half of the header message, the header type. | ||
function extractHeaderType(stream) { | ||
const headerNameLen = Buffer.from(stream.read(1)).readUInt8() | ||
const headerNameWithSeparator = Buffer.from(stream.read(headerNameLen)).toString() | ||
const splitBySeparator = (headerNameWithSeparator || '').split(':') | ||
const headerName = splitBySeparator.length >= 1 ? splitBySeparator[1] : '' | ||
return headerName | ||
} | ||
function extractHeaderValue(stream) { | ||
const bodyLen = Buffer.from(stream.read(2)).readUInt16BE() | ||
const bodyName = Buffer.from(stream.read(bodyLen)).toString() | ||
return bodyName | ||
} | ||
const selectResults = new SelectResults({}) // will be returned | ||
const responseStream = readableStream(res) // convert byte array to a readable responseStream | ||
while (responseStream._readableState.length) { | ||
// Top level responseStream read tracker. | ||
let msgCrcAccumulator // accumulate from start of the message till the message crc start. | ||
const totalByteLengthBuffer = Buffer.from(responseStream.read(4)) | ||
msgCrcAccumulator = crc32(totalByteLengthBuffer) | ||
const headerBytesBuffer = Buffer.from(responseStream.read(4)) | ||
msgCrcAccumulator = crc32(headerBytesBuffer, msgCrcAccumulator) | ||
const calculatedPreludeCrc = msgCrcAccumulator.readInt32BE() // use it to check if any CRC mismatch in header itself. | ||
const preludeCrcBuffer = Buffer.from(responseStream.read(4)) // read 4 bytes i.e 4+4 =8 + 4 = 12 ( prelude + prelude crc) | ||
msgCrcAccumulator = crc32(preludeCrcBuffer, msgCrcAccumulator) | ||
const totalMsgLength = totalByteLengthBuffer.readInt32BE() | ||
const headerLength = headerBytesBuffer.readInt32BE() | ||
const preludeCrcByteValue = preludeCrcBuffer.readInt32BE() | ||
if (preludeCrcByteValue !== calculatedPreludeCrc) { | ||
// Handle Header CRC mismatch Error | ||
throw new Error( | ||
`Header Checksum Mismatch, Prelude CRC of ${preludeCrcByteValue} does not equal expected CRC of ${calculatedPreludeCrc}`, | ||
) | ||
} | ||
const headers = {} | ||
if (headerLength > 0) { | ||
const headerBytes = Buffer.from(responseStream.read(headerLength)) | ||
msgCrcAccumulator = crc32(headerBytes, msgCrcAccumulator) | ||
const headerReaderStream = readableStream(headerBytes) | ||
while (headerReaderStream._readableState.length) { | ||
let headerTypeName = extractHeaderType(headerReaderStream) | ||
headerReaderStream.read(1) // just read and ignore it. | ||
headers[headerTypeName] = extractHeaderValue(headerReaderStream) | ||
} | ||
} | ||
let payloadStream | ||
const payLoadLength = totalMsgLength - headerLength - 16 | ||
if (payLoadLength > 0) { | ||
const payLoadBuffer = Buffer.from(responseStream.read(payLoadLength)) | ||
msgCrcAccumulator = crc32(payLoadBuffer, msgCrcAccumulator) | ||
// read the checksum early and detect any mismatch so we can avoid unnecessary further processing. | ||
const messageCrcByteValue = Buffer.from(responseStream.read(4)).readInt32BE() | ||
const calculatedCrc = msgCrcAccumulator.readInt32BE() | ||
// Handle message CRC Error | ||
if (messageCrcByteValue !== calculatedCrc) { | ||
throw new Error( | ||
`Message Checksum Mismatch, Message CRC of ${messageCrcByteValue} does not equal expected CRC of ${calculatedCrc}`, | ||
) | ||
} | ||
payloadStream = readableStream(payLoadBuffer) | ||
} | ||
const messageType = headers['message-type'] | ||
switch (messageType) { | ||
case 'error': { | ||
const errorMessage = headers['error-code'] + ':"' + headers['error-message'] + '"' | ||
throw new Error(errorMessage) | ||
} | ||
case 'event': { | ||
const contentType = headers['content-type'] | ||
const eventType = headers['event-type'] | ||
switch (eventType) { | ||
case 'End': { | ||
selectResults.setResponse(res) | ||
return selectResults | ||
} | ||
case 'Records': { | ||
const readData = payloadStream.read(payLoadLength) | ||
selectResults.setRecords(readData) | ||
break | ||
} | ||
case 'Progress': | ||
{ | ||
switch (contentType) { | ||
case 'text/xml': { | ||
const progressData = payloadStream.read(payLoadLength) | ||
selectResults.setProgress(progressData.toString()) | ||
break | ||
} | ||
default: { | ||
const errorMessage = `Unexpected content-type ${contentType} sent for event-type Progress` | ||
throw new Error(errorMessage) | ||
} | ||
} | ||
} | ||
break | ||
case 'Stats': | ||
{ | ||
switch (contentType) { | ||
case 'text/xml': { | ||
const statsData = payloadStream.read(payLoadLength) | ||
selectResults.setStats(statsData.toString()) | ||
break | ||
} | ||
default: { | ||
const errorMessage = `Unexpected content-type ${contentType} sent for event-type Stats` | ||
throw new Error(errorMessage) | ||
} | ||
} | ||
} | ||
break | ||
default: { | ||
// Continuation message: Not sure if it is supported. did not find a reference or any message in response. | ||
// It does not have a payload. | ||
const warningMessage = `Un implemented event detected ${messageType}.` | ||
// eslint-disable-next-line no-console | ||
console.warn(warningMessage) | ||
} | ||
} // eventType End | ||
} // Event End | ||
} // messageType End | ||
} // Top Level Stream End | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
118
275
2068672
42
20785
1
7
+ Addedeventemitter3@^5.0.1
+ Addedstream-json@^1.8.0
+ Addedbuffer-crc32@1.0.0(transitive)
+ Addedeventemitter3@5.0.1(transitive)
+ Addedstream-chain@2.2.5(transitive)
+ Addedstream-json@1.9.1(transitive)
- Removedjson-stream@^1.0.0
- Removedxml@^1.0.1
- Removedbuffer-crc32@0.2.13(transitive)
- Removedjson-stream@1.0.0(transitive)
- Removedxml@1.0.1(transitive)
Updatedbuffer-crc32@^1.0.0