@constructive-io/bucket-provisioner 0.23.2 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.d.ts +6 -6
- package/esm/index.js +3 -5
- package/esm/provisioner.d.ts +1 -1
- package/esm/provisioner.js +4 -4
- package/index.d.ts +6 -6
- package/index.js +5 -7
- package/package.json +3 -3
- package/provisioner.d.ts +1 -1
- package/provisioner.js +2 -2
package/esm/index.d.ts
CHANGED
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
* });
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export { BucketProvisioner } from './provisioner';
|
|
30
29
|
export type { BucketProvisionerOptions } from './provisioner';
|
|
30
|
+
export { BucketProvisioner } from './provisioner';
|
|
31
31
|
export { createS3Client } from './client';
|
|
32
|
-
export {
|
|
33
|
-
export
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export type {
|
|
32
|
+
export type { BucketPolicyDocument, BucketPolicyStatement, PublicAccessBlockConfig, } from './policies';
|
|
33
|
+
export { buildCloudFrontOacPolicy, buildPresignedUrlIamPolicy, buildPublicReadPolicy, getPublicAccessBlock, } from './policies';
|
|
34
|
+
export { buildPrivateCorsRules, buildUploadCorsRules } from './cors';
|
|
35
|
+
export { buildAbortIncompleteMultipartRule, buildTempCleanupRule } from './lifecycle';
|
|
36
|
+
export type { BucketAccessType, CorsRule, CreateBucketOptions, LifecycleRule, ProvisionerErrorCode, ProvisionResult, StorageConnectionConfig, StorageProvider, UpdateCorsOptions, } from './types';
|
|
37
37
|
export { ProvisionerError } from './types';
|
package/esm/index.js
CHANGED
|
@@ -26,14 +26,12 @@
|
|
|
26
26
|
* });
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
// Core provisioner
|
|
30
29
|
export { BucketProvisioner } from './provisioner';
|
|
31
30
|
// S3 client factory
|
|
32
31
|
export { createS3Client } from './client';
|
|
33
|
-
|
|
34
|
-
export { getPublicAccessBlock, buildPublicReadPolicy, buildCloudFrontOacPolicy, buildPresignedUrlIamPolicy, } from './policies';
|
|
32
|
+
export { buildCloudFrontOacPolicy, buildPresignedUrlIamPolicy, buildPublicReadPolicy, getPublicAccessBlock, } from './policies';
|
|
35
33
|
// CORS builders
|
|
36
|
-
export {
|
|
34
|
+
export { buildPrivateCorsRules, buildUploadCorsRules } from './cors';
|
|
37
35
|
// Lifecycle builders
|
|
38
|
-
export {
|
|
36
|
+
export { buildAbortIncompleteMultipartRule, buildTempCleanupRule } from './lifecycle';
|
|
39
37
|
export { ProvisionerError } from './types';
|
package/esm/provisioner.d.ts
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* - Public buckets: Block Public Access partially relaxed, public-read bucket policy applied
|
|
11
11
|
*/
|
|
12
12
|
import type { S3Client } from '@aws-sdk/client-s3';
|
|
13
|
-
import type { StorageConnectionConfig, CreateBucketOptions, UpdateCorsOptions, CorsRule, LifecycleRule, ProvisionResult, BucketAccessType } from './types';
|
|
14
13
|
import type { BucketPolicyDocument, PublicAccessBlockConfig } from './policies';
|
|
14
|
+
import type { BucketAccessType, CorsRule, CreateBucketOptions, LifecycleRule, ProvisionResult, StorageConnectionConfig, UpdateCorsOptions } from './types';
|
|
15
15
|
/**
|
|
16
16
|
* Options for the BucketProvisioner constructor.
|
|
17
17
|
*/
|
package/esm/provisioner.js
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
* - Private/temp buckets: Block All Public Access, no bucket policy, presigned URLs only
|
|
10
10
|
* - Public buckets: Block Public Access partially relaxed, public-read bucket policy applied
|
|
11
11
|
*/
|
|
12
|
-
import { CreateBucketCommand,
|
|
13
|
-
import { ProvisionerError } from './types';
|
|
12
|
+
import { CreateBucketCommand, DeleteBucketPolicyCommand, GetBucketCorsCommand, GetBucketLifecycleConfigurationCommand, GetBucketPolicyCommand, GetBucketVersioningCommand, GetPublicAccessBlockCommand, HeadBucketCommand, PutBucketCorsCommand, PutBucketLifecycleConfigurationCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutPublicAccessBlockCommand, } from '@aws-sdk/client-s3';
|
|
14
13
|
import { createS3Client } from './client';
|
|
15
|
-
import {
|
|
16
|
-
import { buildUploadCorsRules, buildPrivateCorsRules } from './cors';
|
|
14
|
+
import { buildPrivateCorsRules, buildUploadCorsRules } from './cors';
|
|
17
15
|
import { buildTempCleanupRule } from './lifecycle';
|
|
16
|
+
import { buildPublicReadPolicy, getPublicAccessBlock } from './policies';
|
|
17
|
+
import { ProvisionerError } from './types';
|
|
18
18
|
/**
|
|
19
19
|
* The BucketProvisioner handles creating and configuring S3-compatible
|
|
20
20
|
* buckets with the correct privacy settings, CORS rules, and policies
|
package/index.d.ts
CHANGED
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
* });
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export { BucketProvisioner } from './provisioner';
|
|
30
29
|
export type { BucketProvisionerOptions } from './provisioner';
|
|
30
|
+
export { BucketProvisioner } from './provisioner';
|
|
31
31
|
export { createS3Client } from './client';
|
|
32
|
-
export {
|
|
33
|
-
export
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export type {
|
|
32
|
+
export type { BucketPolicyDocument, BucketPolicyStatement, PublicAccessBlockConfig, } from './policies';
|
|
33
|
+
export { buildCloudFrontOacPolicy, buildPresignedUrlIamPolicy, buildPublicReadPolicy, getPublicAccessBlock, } from './policies';
|
|
34
|
+
export { buildPrivateCorsRules, buildUploadCorsRules } from './cors';
|
|
35
|
+
export { buildAbortIncompleteMultipartRule, buildTempCleanupRule } from './lifecycle';
|
|
36
|
+
export type { BucketAccessType, CorsRule, CreateBucketOptions, LifecycleRule, ProvisionerErrorCode, ProvisionResult, StorageConnectionConfig, StorageProvider, UpdateCorsOptions, } from './types';
|
|
37
37
|
export { ProvisionerError } from './types';
|
package/index.js
CHANGED
|
@@ -28,26 +28,24 @@
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.ProvisionerError = exports.
|
|
32
|
-
// Core provisioner
|
|
31
|
+
exports.ProvisionerError = exports.buildTempCleanupRule = exports.buildAbortIncompleteMultipartRule = exports.buildUploadCorsRules = exports.buildPrivateCorsRules = exports.getPublicAccessBlock = exports.buildPublicReadPolicy = exports.buildPresignedUrlIamPolicy = exports.buildCloudFrontOacPolicy = exports.createS3Client = exports.BucketProvisioner = void 0;
|
|
33
32
|
var provisioner_1 = require("./provisioner");
|
|
34
33
|
Object.defineProperty(exports, "BucketProvisioner", { enumerable: true, get: function () { return provisioner_1.BucketProvisioner; } });
|
|
35
34
|
// S3 client factory
|
|
36
35
|
var client_1 = require("./client");
|
|
37
36
|
Object.defineProperty(exports, "createS3Client", { enumerable: true, get: function () { return client_1.createS3Client; } });
|
|
38
|
-
// Policy builders
|
|
39
37
|
var policies_1 = require("./policies");
|
|
40
|
-
Object.defineProperty(exports, "getPublicAccessBlock", { enumerable: true, get: function () { return policies_1.getPublicAccessBlock; } });
|
|
41
|
-
Object.defineProperty(exports, "buildPublicReadPolicy", { enumerable: true, get: function () { return policies_1.buildPublicReadPolicy; } });
|
|
42
38
|
Object.defineProperty(exports, "buildCloudFrontOacPolicy", { enumerable: true, get: function () { return policies_1.buildCloudFrontOacPolicy; } });
|
|
43
39
|
Object.defineProperty(exports, "buildPresignedUrlIamPolicy", { enumerable: true, get: function () { return policies_1.buildPresignedUrlIamPolicy; } });
|
|
40
|
+
Object.defineProperty(exports, "buildPublicReadPolicy", { enumerable: true, get: function () { return policies_1.buildPublicReadPolicy; } });
|
|
41
|
+
Object.defineProperty(exports, "getPublicAccessBlock", { enumerable: true, get: function () { return policies_1.getPublicAccessBlock; } });
|
|
44
42
|
// CORS builders
|
|
45
43
|
var cors_1 = require("./cors");
|
|
46
|
-
Object.defineProperty(exports, "buildUploadCorsRules", { enumerable: true, get: function () { return cors_1.buildUploadCorsRules; } });
|
|
47
44
|
Object.defineProperty(exports, "buildPrivateCorsRules", { enumerable: true, get: function () { return cors_1.buildPrivateCorsRules; } });
|
|
45
|
+
Object.defineProperty(exports, "buildUploadCorsRules", { enumerable: true, get: function () { return cors_1.buildUploadCorsRules; } });
|
|
48
46
|
// Lifecycle builders
|
|
49
47
|
var lifecycle_1 = require("./lifecycle");
|
|
50
|
-
Object.defineProperty(exports, "buildTempCleanupRule", { enumerable: true, get: function () { return lifecycle_1.buildTempCleanupRule; } });
|
|
51
48
|
Object.defineProperty(exports, "buildAbortIncompleteMultipartRule", { enumerable: true, get: function () { return lifecycle_1.buildAbortIncompleteMultipartRule; } });
|
|
49
|
+
Object.defineProperty(exports, "buildTempCleanupRule", { enumerable: true, get: function () { return lifecycle_1.buildTempCleanupRule; } });
|
|
52
50
|
var types_1 = require("./types");
|
|
53
51
|
Object.defineProperty(exports, "ProvisionerError", { enumerable: true, get: function () { return types_1.ProvisionerError; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/bucket-provisioner",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "S3-compatible bucket provisioning library — create buckets, configure privacy policies, CORS, and access controls",
|
|
6
6
|
"main": "index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@aws-sdk/client-s3": "^3.1052.0",
|
|
33
|
-
"@constructive-io/s3-utils": "^2.
|
|
33
|
+
"@constructive-io/s3-utils": "^2.30.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"makage": "^0.3.0"
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"storage",
|
|
45
45
|
"constructive"
|
|
46
46
|
],
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "d508453a32a2f1d70ff6916871046615226e6f33"
|
|
48
48
|
}
|
package/provisioner.d.ts
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* - Public buckets: Block Public Access partially relaxed, public-read bucket policy applied
|
|
11
11
|
*/
|
|
12
12
|
import type { S3Client } from '@aws-sdk/client-s3';
|
|
13
|
-
import type { StorageConnectionConfig, CreateBucketOptions, UpdateCorsOptions, CorsRule, LifecycleRule, ProvisionResult, BucketAccessType } from './types';
|
|
14
13
|
import type { BucketPolicyDocument, PublicAccessBlockConfig } from './policies';
|
|
14
|
+
import type { BucketAccessType, CorsRule, CreateBucketOptions, LifecycleRule, ProvisionResult, StorageConnectionConfig, UpdateCorsOptions } from './types';
|
|
15
15
|
/**
|
|
16
16
|
* Options for the BucketProvisioner constructor.
|
|
17
17
|
*/
|
package/provisioner.js
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.BucketProvisioner = void 0;
|
|
15
15
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
16
|
-
const types_1 = require("./types");
|
|
17
16
|
const client_1 = require("./client");
|
|
18
|
-
const policies_1 = require("./policies");
|
|
19
17
|
const cors_1 = require("./cors");
|
|
20
18
|
const lifecycle_1 = require("./lifecycle");
|
|
19
|
+
const policies_1 = require("./policies");
|
|
20
|
+
const types_1 = require("./types");
|
|
21
21
|
/**
|
|
22
22
|
* The BucketProvisioner handles creating and configuring S3-compatible
|
|
23
23
|
* buckets with the correct privacy settings, CORS rules, and policies
|