@lowdefy/plugin-aws 4.2.0 → 4.2.1
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/dist/blocks/S3Download/S3Download.js +70 -0
- package/dist/blocks/S3Download/schema.json +85 -0
- package/dist/blocks/S3Download/style.less +17 -0
- package/dist/blocks/S3UploadButton/S3UploadButton.js +97 -0
- package/dist/blocks/S3UploadButton/__snapshots__/S3UploadButton.mock.test.js.snap +1597 -0
- package/dist/blocks/S3UploadButton/__snapshots__/S3UploadButton.test.js.snap +281 -0
- package/dist/blocks/S3UploadButton/examples.yaml +44 -0
- package/dist/blocks/S3UploadButton/schema.json +87 -0
- package/dist/blocks/S3UploadButton/style.less +18 -0
- package/dist/blocks/S3UploadDragger/S3UploadDragger.js +101 -0
- package/dist/blocks/S3UploadDragger/schema.json +81 -0
- package/dist/blocks/S3UploadDragger/style.less +17 -0
- package/dist/blocks/S3UploadPhoto/S3UploadPhoto.js +114 -0
- package/dist/blocks/S3UploadPhoto/schema.json +79 -0
- package/dist/blocks/S3UploadPhoto/style.less +17 -0
- package/dist/blocks/utils/getOnPaste.js +48 -0
- package/dist/blocks/utils/getS3Upload.js +81 -0
- package/dist/blocks/utils/useFileList.js +115 -0
- package/dist/blocks.js +18 -0
- package/dist/connections/AwsS3Bucket/AwsS3Bucket.js +24 -0
- package/dist/connections/AwsS3Bucket/AwsS3PresignedGetObject/AwsS3PresignedGetObject.js +41 -0
- package/dist/connections/AwsS3Bucket/AwsS3PresignedGetObject/schema.js +64 -0
- package/dist/connections/AwsS3Bucket/AwsS3PresignedPostPolicy/AwsS3PresignedPostPolicy.js +57 -0
- package/dist/connections/AwsS3Bucket/AwsS3PresignedPostPolicy/schema.js +70 -0
- package/dist/connections/AwsS3Bucket/schema.js +80 -0
- package/dist/connections.js +15 -0
- package/dist/types.js +32 -0
- package/package.json +7 -7
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
17
|
+
title: 'Lowdefy Request Schema - AwsS3PresignedPostPolicy',
|
|
18
|
+
type: 'object',
|
|
19
|
+
required: [
|
|
20
|
+
'key'
|
|
21
|
+
],
|
|
22
|
+
properties: {
|
|
23
|
+
acl: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
enum: [
|
|
26
|
+
'private',
|
|
27
|
+
'public-read',
|
|
28
|
+
'public-read-write',
|
|
29
|
+
'aws-exec-read',
|
|
30
|
+
'authenticated-read',
|
|
31
|
+
'bucket-owner-read',
|
|
32
|
+
'bucket-owner-full-control'
|
|
33
|
+
],
|
|
34
|
+
description: 'Access control lists used to grant read and write access.',
|
|
35
|
+
errorMessage: {
|
|
36
|
+
type: 'AwsS3PresignedPostPolicy request property "acl" should be a string.',
|
|
37
|
+
enum: 'AwsS3PresignedPostPolicy request property "acl" is not one of "private", "public-read", "public-read-write", "aws-exec-read", "authenticated-read", "bucket-owner-read", "bucket-owner-full-control".'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
conditions: {
|
|
41
|
+
type: 'array',
|
|
42
|
+
items: {
|
|
43
|
+
type: 'array'
|
|
44
|
+
},
|
|
45
|
+
description: 'Conditions to be enforced on the request.',
|
|
46
|
+
errorMessage: {
|
|
47
|
+
type: 'AwsS3PresignedPostPolicy request property "conditions" should be a array.'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
expires: {
|
|
51
|
+
type: 'number',
|
|
52
|
+
description: 'Number of seconds for which the policy should be valid.',
|
|
53
|
+
default: 3600,
|
|
54
|
+
errorMessage: {
|
|
55
|
+
type: 'AwsS3PresignedPostPolicy request property "expires" should be a number.'
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
key: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Key under which object will be stored.',
|
|
61
|
+
errorMessage: {
|
|
62
|
+
type: 'AwsS3PresignedPostPolicy request property "key" should be a string.'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
errorMessage: {
|
|
67
|
+
type: 'AwsS3PresignedPostPolicy request properties should be an object.',
|
|
68
|
+
required: 'AwsS3PresignedPostPolicy request should have required property "key".'
|
|
69
|
+
}
|
|
70
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
17
|
+
title: 'Lowdefy Connection Schema - AwsS3Bucket',
|
|
18
|
+
type: 'object',
|
|
19
|
+
required: [
|
|
20
|
+
'accessKeyId',
|
|
21
|
+
'secretAccessKey',
|
|
22
|
+
'region',
|
|
23
|
+
'bucket'
|
|
24
|
+
],
|
|
25
|
+
properties: {
|
|
26
|
+
accessKeyId: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'AWS IAM access key id with s3 access.',
|
|
29
|
+
errorMessage: {
|
|
30
|
+
type: 'AwsS3Bucket connection property "accessKeyId" should be a string.'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
secretAccessKey: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'AWS IAM secret access key with s3 access.',
|
|
36
|
+
errorMessage: {
|
|
37
|
+
type: 'AwsS3Bucket connection property "secretAccessKey" should be a string.'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
region: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: 'AWS region the bucket is located in.',
|
|
43
|
+
errorMessage: {
|
|
44
|
+
type: 'AwsS3Bucket connection property "region" should be a string.'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
bucket: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'S3 bucket name.',
|
|
50
|
+
errorMessage: {
|
|
51
|
+
type: 'AwsS3Bucket connection property "bucket" should be a string.'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
read: {
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
default: true,
|
|
57
|
+
description: 'Allow reads from the bucket.',
|
|
58
|
+
errorMessage: {
|
|
59
|
+
type: 'AwsS3Bucket connection property "read" should be a boolean.'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
write: {
|
|
63
|
+
type: 'boolean',
|
|
64
|
+
default: false,
|
|
65
|
+
description: 'Allow writes to the bucket.',
|
|
66
|
+
errorMessage: {
|
|
67
|
+
type: 'AwsS3Bucket connection property "write" should be a boolean.'
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
errorMessage: {
|
|
72
|
+
type: 'AwsS3Bucket connection properties should be an object.',
|
|
73
|
+
required: {
|
|
74
|
+
accessKeyId: 'AwsS3Bucket connection should have required property "accessKeyId".',
|
|
75
|
+
secretAccessKey: 'AwsS3Bucket connection should have required property "secretAccessKey".',
|
|
76
|
+
region: 'AwsS3Bucket connection should have required property "region".',
|
|
77
|
+
bucket: 'AwsS3Bucket connection should have required property "bucket".'
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export { default as AwsS3Bucket } from './connections/AwsS3Bucket/AwsS3Bucket.js';
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* eslint-disable import/namespace */ /*
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import * as connections from './connections.js';
|
|
16
|
+
import * as blocks from './blocks.js';
|
|
17
|
+
const icons = {};
|
|
18
|
+
const styles = {};
|
|
19
|
+
Object.keys(blocks).forEach((block)=>{
|
|
20
|
+
icons[block] = blocks[block].meta.icons ?? [];
|
|
21
|
+
styles[block] = blocks[block].meta.styles ?? [];
|
|
22
|
+
});
|
|
23
|
+
export default {
|
|
24
|
+
blocks: Object.keys(blocks),
|
|
25
|
+
icons,
|
|
26
|
+
styles: {
|
|
27
|
+
default: [],
|
|
28
|
+
...styles
|
|
29
|
+
},
|
|
30
|
+
connections: Object.keys(connections),
|
|
31
|
+
requests: Object.keys(connections).map((connection)=>Object.keys(connections[connection].requests)).flat()
|
|
32
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/plugin-aws",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"dist/*"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@lowdefy/block-utils": "4.2.
|
|
44
|
-
"@lowdefy/blocks-antd": "4.2.
|
|
45
|
-
"@lowdefy/helpers": "4.2.
|
|
43
|
+
"@lowdefy/block-utils": "4.2.1",
|
|
44
|
+
"@lowdefy/blocks-antd": "4.2.1",
|
|
45
|
+
"@lowdefy/helpers": "4.2.1",
|
|
46
46
|
"antd": "4.24.14",
|
|
47
47
|
"aws-sdk": "2.1459.0",
|
|
48
48
|
"react": "18.2.0",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@emotion/jest": "11.10.5",
|
|
53
|
-
"@lowdefy/ajv": "4.2.
|
|
54
|
-
"@lowdefy/block-dev": "4.2.
|
|
55
|
-
"@lowdefy/jest-yaml-transform": "4.2.
|
|
53
|
+
"@lowdefy/ajv": "4.2.1",
|
|
54
|
+
"@lowdefy/block-dev": "4.2.1",
|
|
55
|
+
"@lowdefy/jest-yaml-transform": "4.2.1",
|
|
56
56
|
"@swc/cli": "0.1.63",
|
|
57
57
|
"@swc/core": "1.3.99",
|
|
58
58
|
"@swc/jest": "0.2.29",
|