@lowdefy/plugin-aws 4.0.0-rc.0 → 4.0.0-rc.2
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/S3UploadButton/S3UploadButton.js +19 -19
- package/dist/blocks/S3UploadButton/examples.yaml +1 -1
- package/dist/blocks/S3UploadButton/style.less +1 -1
- package/dist/blocks/S3UploadPhoto/S3UploadPhoto.js +19 -19
- package/dist/blocks/S3UploadPhoto/style.less +1 -1
- package/dist/blocks.js +1 -1
- package/dist/connections/AwsS3Bucket/AwsS3Bucket.js +1 -1
- package/dist/connections/AwsS3Bucket/AwsS3PresignedGetObject/AwsS3PresignedGetObject.js +1 -1
- package/dist/connections/AwsS3Bucket/AwsS3PresignedGetObject/schema.js +1 -1
- package/dist/connections/AwsS3Bucket/AwsS3PresignedPostPolicy/AwsS3PresignedPostPolicy.js +1 -1
- package/dist/connections/AwsS3Bucket/AwsS3PresignedPostPolicy/schema.js +2 -2
- package/dist/connections/AwsS3Bucket/schema.js +1 -1
- package/dist/connections.js +1 -1
- package/dist/types.js +1 -1
- package/package.json +18 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -65,7 +65,7 @@ const getCustomRequest = ({ methods , setS3Parameters })=>async ({ file , onErr
|
|
|
65
65
|
}
|
|
66
66
|
const { url , fields } = s3PostPolicyResponse.responses.__getS3PostPolicy.response[0];
|
|
67
67
|
const { bucket , key } = fields;
|
|
68
|
-
const
|
|
68
|
+
const meta1 = {
|
|
69
69
|
bucket,
|
|
70
70
|
key,
|
|
71
71
|
filename: name,
|
|
@@ -95,39 +95,39 @@ const getCustomRequest = ({ methods , setS3Parameters })=>async ({ file , onErr
|
|
|
95
95
|
// file needs to be the last field in the form
|
|
96
96
|
formData.append('file', file);
|
|
97
97
|
const xhr = new XMLHttpRequest();
|
|
98
|
-
xhr.upload.onprogress = (
|
|
99
|
-
if (
|
|
98
|
+
xhr.upload.onprogress = (event1)=>{
|
|
99
|
+
if (event1.lengthComputable) {
|
|
100
100
|
onProgress({
|
|
101
|
-
percent:
|
|
101
|
+
percent: event1.loaded / event1.total * 80 + 20
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
|
-
xhr.addEventListener('error', async (
|
|
105
|
+
xhr.addEventListener('error', async (event1)=>{
|
|
106
106
|
await methods.triggerEvent({
|
|
107
107
|
name: 'onError',
|
|
108
108
|
event: {
|
|
109
|
-
meta,
|
|
110
|
-
event
|
|
109
|
+
meta: meta1,
|
|
110
|
+
event: event1
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
|
-
onError(
|
|
113
|
+
onError(event1);
|
|
114
114
|
});
|
|
115
|
-
xhr.addEventListener('load', async (
|
|
115
|
+
xhr.addEventListener('load', async (event1)=>{
|
|
116
116
|
await methods.triggerEvent({
|
|
117
117
|
name: 'onSuccess',
|
|
118
118
|
event: {
|
|
119
|
-
meta,
|
|
120
|
-
event
|
|
119
|
+
meta: meta1,
|
|
120
|
+
event: event1
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
|
-
onSuccess(
|
|
123
|
+
onSuccess(event1);
|
|
124
124
|
});
|
|
125
|
-
xhr.addEventListener('loadend', async (
|
|
125
|
+
xhr.addEventListener('loadend', async (event1)=>{
|
|
126
126
|
await methods.triggerEvent({
|
|
127
127
|
name: 'onDone',
|
|
128
128
|
event: {
|
|
129
|
-
meta,
|
|
130
|
-
event
|
|
129
|
+
meta: meta1,
|
|
130
|
+
event: event1
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
});
|
|
@@ -169,7 +169,7 @@ const S3UploadButtonBlock = ({ blockId , components , events , methods , propert
|
|
|
169
169
|
params: [
|
|
170
170
|
properties.s3PostPolicyRequestId
|
|
171
171
|
]
|
|
172
|
-
}
|
|
172
|
+
}
|
|
173
173
|
]
|
|
174
174
|
});
|
|
175
175
|
}, []);
|
|
@@ -184,8 +184,8 @@ const S3UploadButtonBlock = ({ blockId , components , events , methods , propert
|
|
|
184
184
|
id: blockId,
|
|
185
185
|
multiple: !properties.singleFile,
|
|
186
186
|
showUploadList: properties.showUploadList,
|
|
187
|
-
onChange: (
|
|
188
|
-
methods.setValue(makeOnChangeValue(s3Parameters,
|
|
187
|
+
onChange: (event1)=>{
|
|
188
|
+
methods.setValue(makeOnChangeValue(s3Parameters, event1));
|
|
189
189
|
methods.triggerEvent({
|
|
190
190
|
name: 'onChange'
|
|
191
191
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -59,7 +59,7 @@ const getCustomRequest = ({ methods , setS3Parameters , setLoading })=>async ({
|
|
|
59
59
|
}
|
|
60
60
|
const { url , fields } = s3PostPolicyResponse.responses.__getS3PostPolicy.response[0];
|
|
61
61
|
const { bucket , key } = fields;
|
|
62
|
-
const
|
|
62
|
+
const meta1 = {
|
|
63
63
|
bucket,
|
|
64
64
|
key,
|
|
65
65
|
filename: name,
|
|
@@ -89,39 +89,39 @@ const getCustomRequest = ({ methods , setS3Parameters , setLoading })=>async ({
|
|
|
89
89
|
// file needs to be the last field in the form
|
|
90
90
|
formData.append('file', file);
|
|
91
91
|
const xhr = new XMLHttpRequest();
|
|
92
|
-
xhr.upload.onprogress = (
|
|
93
|
-
if (
|
|
92
|
+
xhr.upload.onprogress = (event1)=>{
|
|
93
|
+
if (event1.lengthComputable) {
|
|
94
94
|
onProgress({
|
|
95
|
-
percent:
|
|
95
|
+
percent: event1.loaded / event1.total * 80 + 20
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
xhr.addEventListener('error', async (
|
|
99
|
+
xhr.addEventListener('error', async (event1)=>{
|
|
100
100
|
await methods.triggerEvent({
|
|
101
101
|
name: 'onError',
|
|
102
102
|
event: {
|
|
103
|
-
meta,
|
|
104
|
-
event
|
|
103
|
+
meta: meta1,
|
|
104
|
+
event: event1
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
|
-
onError(
|
|
107
|
+
onError(event1);
|
|
108
108
|
});
|
|
109
|
-
xhr.addEventListener('load', async (
|
|
109
|
+
xhr.addEventListener('load', async (event1)=>{
|
|
110
110
|
await methods.triggerEvent({
|
|
111
111
|
name: 'onSuccess',
|
|
112
112
|
event: {
|
|
113
|
-
meta,
|
|
114
|
-
event
|
|
113
|
+
meta: meta1,
|
|
114
|
+
event: event1
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
|
-
onSuccess(
|
|
117
|
+
onSuccess(event1);
|
|
118
118
|
});
|
|
119
|
-
xhr.addEventListener('loadend', async (
|
|
119
|
+
xhr.addEventListener('loadend', async (event1)=>{
|
|
120
120
|
await methods.triggerEvent({
|
|
121
121
|
name: 'onDone',
|
|
122
122
|
event: {
|
|
123
|
-
meta,
|
|
124
|
-
event
|
|
123
|
+
meta: meta1,
|
|
124
|
+
event: event1
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
setLoading(false);
|
|
@@ -166,7 +166,7 @@ const S3UploadPhoto = ({ blockId , components: { Icon } , events , methods , pr
|
|
|
166
166
|
params: [
|
|
167
167
|
properties.s3PostPolicyRequestId
|
|
168
168
|
]
|
|
169
|
-
}
|
|
169
|
+
}
|
|
170
170
|
]
|
|
171
171
|
});
|
|
172
172
|
}, []);
|
|
@@ -179,8 +179,8 @@ const S3UploadPhoto = ({ blockId , components: { Icon } , events , methods , pr
|
|
|
179
179
|
id: blockId,
|
|
180
180
|
multiple: !properties.singleFile,
|
|
181
181
|
showUploadList: properties.showUploadList,
|
|
182
|
-
onChange: (
|
|
183
|
-
methods.setValue(makeOnChangeValue(s3Parameters,
|
|
182
|
+
onChange: (event1)=>{
|
|
183
|
+
methods.setValue(makeOnChangeValue(s3Parameters, event1));
|
|
184
184
|
methods.triggerEvent({
|
|
185
185
|
name: 'onChange'
|
|
186
186
|
});
|
package/dist/blocks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
'aws-exec-read',
|
|
30
30
|
'authenticated-read',
|
|
31
31
|
'bucket-owner-read',
|
|
32
|
-
'bucket-owner-full-control'
|
|
32
|
+
'bucket-owner-full-control'
|
|
33
33
|
],
|
|
34
34
|
description: 'Access control lists used to grant read and write access.',
|
|
35
35
|
errorMessage: {
|
package/dist/connections.js
CHANGED
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/plugin-aws",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -42,29 +42,28 @@
|
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
|
|
44
44
|
"clean": "rm -rf dist",
|
|
45
|
-
"copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\""
|
|
46
|
-
"prepare": "pnpm build"
|
|
45
|
+
"copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\""
|
|
47
46
|
},
|
|
48
47
|
"dependencies": {
|
|
49
|
-
"@lowdefy/block-utils": "4.0.0-rc.
|
|
50
|
-
"@lowdefy/blocks-antd": "4.0.0-rc.
|
|
51
|
-
"@lowdefy/helpers": "4.0.0-rc.
|
|
52
|
-
"antd": "4.
|
|
53
|
-
"aws-sdk": "2.
|
|
48
|
+
"@lowdefy/block-utils": "4.0.0-rc.2",
|
|
49
|
+
"@lowdefy/blocks-antd": "4.0.0-rc.2",
|
|
50
|
+
"@lowdefy/helpers": "4.0.0-rc.2",
|
|
51
|
+
"antd": "4.24.7",
|
|
52
|
+
"aws-sdk": "2.1286.0",
|
|
54
53
|
"react": "18.2.0",
|
|
55
54
|
"react-dom": "18.2.0"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
|
-
"@emotion/jest": "11.
|
|
59
|
-
"@lowdefy/ajv": "4.0.0-rc.
|
|
60
|
-
"@lowdefy/block-dev": "4.0.0-rc.
|
|
61
|
-
"@lowdefy/jest-yaml-transform": "4.0.0-rc.
|
|
62
|
-
"@swc/cli": "0.1.
|
|
63
|
-
"@swc/core": "1.
|
|
64
|
-
"@swc/jest": "0.2.
|
|
65
|
-
"@testing-library/dom": "8.
|
|
66
|
-
"@testing-library/react": "13.
|
|
67
|
-
"@testing-library/user-event": "14.
|
|
57
|
+
"@emotion/jest": "11.10.5",
|
|
58
|
+
"@lowdefy/ajv": "4.0.0-rc.2",
|
|
59
|
+
"@lowdefy/block-dev": "4.0.0-rc.2",
|
|
60
|
+
"@lowdefy/jest-yaml-transform": "4.0.0-rc.2",
|
|
61
|
+
"@swc/cli": "0.1.59",
|
|
62
|
+
"@swc/core": "1.3.24",
|
|
63
|
+
"@swc/jest": "0.2.24",
|
|
64
|
+
"@testing-library/dom": "8.19.1",
|
|
65
|
+
"@testing-library/react": "13.4.0",
|
|
66
|
+
"@testing-library/user-event": "14.4.3",
|
|
68
67
|
"copyfiles": "2.4.1",
|
|
69
68
|
"jest": "28.1.0",
|
|
70
69
|
"jest-environment-jsdom": "28.1.0",
|
|
@@ -73,5 +72,5 @@
|
|
|
73
72
|
"publishConfig": {
|
|
74
73
|
"access": "public"
|
|
75
74
|
},
|
|
76
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "ac0dec732efb3b3cb06c82941d8f829c9fa65dff"
|
|
77
76
|
}
|