@lowdefy/plugin-gcp 0.0.0-experimental-20260707082859
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/LICENSE +201 -0
- package/README.md +24 -0
- package/dist/connections/GoogleCloudStorageBucket/GcsGetObject/GcsGetObject.js +49 -0
- package/dist/connections/GoogleCloudStorageBucket/GcsGetObject/schema.js +35 -0
- package/dist/connections/GoogleCloudStorageBucket/GcsPutObject/GcsPutObject.js +45 -0
- package/dist/connections/GoogleCloudStorageBucket/GcsPutObject/schema.js +61 -0
- package/dist/connections/GoogleCloudStorageBucket/GcsSignedGetUrl/GcsSignedGetUrl.js +48 -0
- package/dist/connections/GoogleCloudStorageBucket/GcsSignedGetUrl/schema.js +65 -0
- package/dist/connections/GoogleCloudStorageBucket/GcsSignedPostPolicy/GcsSignedPostPolicy.js +49 -0
- package/dist/connections/GoogleCloudStorageBucket/GcsSignedPostPolicy/schema.js +60 -0
- package/dist/connections/GoogleCloudStorageBucket/GoogleCloudStorageBucket.js +28 -0
- package/dist/connections/GoogleCloudStorageBucket/getBucket.js +34 -0
- package/dist/connections/GoogleCloudStorageBucket/getPublicUrl.js +26 -0
- package/dist/connections/GoogleCloudStorageBucket/schema.js +81 -0
- package/dist/connections.js +15 -0
- package/dist/types.js +25 -0
- package/package.json +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @lowdefy/plugin-gcp
|
|
2
|
+
|
|
3
|
+
Google Cloud Platform connections for Lowdefy.
|
|
4
|
+
|
|
5
|
+
## Connections
|
|
6
|
+
|
|
7
|
+
- `GoogleCloudStorageBucket` — a Google Cloud Storage bucket.
|
|
8
|
+
|
|
9
|
+
## Requests
|
|
10
|
+
|
|
11
|
+
- `GcsSignedPostPolicy` — signs a V4 POST policy for direct browser uploads.
|
|
12
|
+
Returns the standard upload-policy descriptor
|
|
13
|
+
`{ method: 'POST', url, key, bucket, fields }` used by the
|
|
14
|
+
`@lowdefy/blocks-files` upload blocks.
|
|
15
|
+
- `GcsSignedGetUrl` — signs a V4 read URL for downloads, or returns a stable
|
|
16
|
+
public URL when the request sets `public: true`.
|
|
17
|
+
- `GcsPutObject` — server-side write request that stores base64 content as an
|
|
18
|
+
object. Used from API endpoint routines.
|
|
19
|
+
|
|
20
|
+
For more Lowdefy documentation, see [lowdefy.com](https://lowdefy.com).
|
|
21
|
+
|
|
22
|
+
## License
|
|
23
|
+
|
|
24
|
+
[Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 { type } from '@lowdefy/helpers';
|
|
16
|
+
import getBucket from '../getBucket.js';
|
|
17
|
+
import schema from './schema.js';
|
|
18
|
+
// Server-side read: returns the object content as a base64 string so routine
|
|
19
|
+
// steps can process it with operators and pass it to other steps (base64
|
|
20
|
+
// survives JSON serialization; consumers decode with Buffer.from(content, 'base64')).
|
|
21
|
+
async function GcsGetObject({ request, connection }) {
|
|
22
|
+
const { bucket } = connection;
|
|
23
|
+
const { key } = request;
|
|
24
|
+
const file = getBucket({
|
|
25
|
+
connection
|
|
26
|
+
}).file(key);
|
|
27
|
+
// Metadata is only used for contentType — size is derived from the returned
|
|
28
|
+
// content so it always matches, even if the object is overwritten between calls.
|
|
29
|
+
const [[content], [metadata]] = await Promise.all([
|
|
30
|
+
file.download(),
|
|
31
|
+
file.getMetadata()
|
|
32
|
+
]);
|
|
33
|
+
const result = {
|
|
34
|
+
bucket,
|
|
35
|
+
key,
|
|
36
|
+
content: content.toString('base64'),
|
|
37
|
+
size: content.length
|
|
38
|
+
};
|
|
39
|
+
if (!type.isNone(metadata.contentType)) {
|
|
40
|
+
result.contentType = metadata.contentType;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
GcsGetObject.schema = schema;
|
|
45
|
+
GcsGetObject.meta = {
|
|
46
|
+
checkRead: true,
|
|
47
|
+
checkWrite: false
|
|
48
|
+
};
|
|
49
|
+
export default GcsGetObject;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 - GcsGetObject',
|
|
18
|
+
type: 'object',
|
|
19
|
+
required: [
|
|
20
|
+
'key'
|
|
21
|
+
],
|
|
22
|
+
properties: {
|
|
23
|
+
key: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'Key under which the object is stored.',
|
|
26
|
+
errorMessage: {
|
|
27
|
+
type: 'GcsGetObject request property "key" should be a string.'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
errorMessage: {
|
|
32
|
+
type: 'GcsGetObject request properties should be an object.',
|
|
33
|
+
required: 'GcsGetObject request should have required property "key".'
|
|
34
|
+
}
|
|
35
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 getBucket from '../getBucket.js';
|
|
16
|
+
import schema from './schema.js';
|
|
17
|
+
// Server-side write: stores base64 content as an object. Used by API endpoint
|
|
18
|
+
// routines that receive files as endpoint payloads (emitFileContent + CallAPI).
|
|
19
|
+
async function GcsPutObject({ request, connection }) {
|
|
20
|
+
const { bucket } = connection;
|
|
21
|
+
const { content, contentType, key } = request;
|
|
22
|
+
const options = {
|
|
23
|
+
resumable: false
|
|
24
|
+
};
|
|
25
|
+
if (contentType) {
|
|
26
|
+
options.contentType = contentType;
|
|
27
|
+
}
|
|
28
|
+
if (request.public === true) {
|
|
29
|
+
options.public = true;
|
|
30
|
+
}
|
|
31
|
+
const file = getBucket({
|
|
32
|
+
connection
|
|
33
|
+
}).file(key);
|
|
34
|
+
await file.save(Buffer.from(content, 'base64'), options);
|
|
35
|
+
return {
|
|
36
|
+
bucket,
|
|
37
|
+
key
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
GcsPutObject.schema = schema;
|
|
41
|
+
GcsPutObject.meta = {
|
|
42
|
+
checkRead: false,
|
|
43
|
+
checkWrite: true
|
|
44
|
+
};
|
|
45
|
+
export default GcsPutObject;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 - GcsPutObject',
|
|
18
|
+
type: 'object',
|
|
19
|
+
required: [
|
|
20
|
+
'key',
|
|
21
|
+
'content'
|
|
22
|
+
],
|
|
23
|
+
properties: {
|
|
24
|
+
content: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Object content as a base64 encoded string.',
|
|
27
|
+
errorMessage: {
|
|
28
|
+
type: 'GcsPutObject request property "content" should be a string.'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
contentType: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'MIME type of the object (sets the Content-Type of the stored object).',
|
|
34
|
+
errorMessage: {
|
|
35
|
+
type: 'GcsPutObject request property "contentType" should be a string.'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
key: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Key under which the object will be stored.',
|
|
41
|
+
errorMessage: {
|
|
42
|
+
type: 'GcsPutObject request property "key" should be a string.'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
public: {
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
default: false,
|
|
48
|
+
description: 'Make the stored object publicly readable.',
|
|
49
|
+
errorMessage: {
|
|
50
|
+
type: 'GcsPutObject request property "public" should be a boolean.'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
errorMessage: {
|
|
55
|
+
type: 'GcsPutObject request properties should be an object.',
|
|
56
|
+
required: {
|
|
57
|
+
key: 'GcsPutObject request should have required property "key".',
|
|
58
|
+
content: 'GcsPutObject request should have required property "content".'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 getBucket from '../getBucket.js';
|
|
16
|
+
import getPublicUrl from '../getPublicUrl.js';
|
|
17
|
+
import schema from './schema.js';
|
|
18
|
+
async function GcsSignedGetUrl({ request, connection }) {
|
|
19
|
+
const { expires = 3600, key, responseDisposition, responseType } = request;
|
|
20
|
+
if (request.public === true) {
|
|
21
|
+
return getPublicUrl({
|
|
22
|
+
connection,
|
|
23
|
+
key
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const options = {
|
|
27
|
+
version: 'v4',
|
|
28
|
+
action: 'read',
|
|
29
|
+
expires: Date.now() + expires * 1000
|
|
30
|
+
};
|
|
31
|
+
if (responseDisposition) {
|
|
32
|
+
options.responseDisposition = responseDisposition;
|
|
33
|
+
}
|
|
34
|
+
if (responseType) {
|
|
35
|
+
options.responseType = responseType;
|
|
36
|
+
}
|
|
37
|
+
const file = getBucket({
|
|
38
|
+
connection
|
|
39
|
+
}).file(key);
|
|
40
|
+
const [url] = await file.getSignedUrl(options);
|
|
41
|
+
return url;
|
|
42
|
+
}
|
|
43
|
+
GcsSignedGetUrl.schema = schema;
|
|
44
|
+
GcsSignedGetUrl.meta = {
|
|
45
|
+
checkRead: true,
|
|
46
|
+
checkWrite: false
|
|
47
|
+
};
|
|
48
|
+
export default GcsSignedGetUrl;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 - GcsSignedGetUrl',
|
|
18
|
+
type: 'object',
|
|
19
|
+
required: [
|
|
20
|
+
'key'
|
|
21
|
+
],
|
|
22
|
+
properties: {
|
|
23
|
+
expires: {
|
|
24
|
+
type: 'number',
|
|
25
|
+
description: 'Number of seconds for which the signed URL should be valid.',
|
|
26
|
+
default: 3600,
|
|
27
|
+
errorMessage: {
|
|
28
|
+
type: 'GcsSignedGetUrl request property "expires" should be a number.'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
key: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'Key under which object is stored.',
|
|
34
|
+
errorMessage: {
|
|
35
|
+
type: 'GcsSignedGetUrl request property "key" should be a string.'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
public: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
default: false,
|
|
41
|
+
description: 'Return a stable, non-expiring public URL instead of a signed URL. The object must be publicly readable — public is author-declared and never checked at runtime.',
|
|
42
|
+
errorMessage: {
|
|
43
|
+
type: 'GcsSignedGetUrl request property "public" should be a boolean.'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
responseDisposition: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
description: 'Sets the Content-Disposition header of the response.',
|
|
49
|
+
errorMessage: {
|
|
50
|
+
type: 'GcsSignedGetUrl request property "responseDisposition" should be a string.'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
responseType: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
description: 'Sets the Content-Type header of the response.',
|
|
56
|
+
errorMessage: {
|
|
57
|
+
type: 'GcsSignedGetUrl request property "responseType" should be a string.'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
errorMessage: {
|
|
62
|
+
type: 'GcsSignedGetUrl request properties should be an object.',
|
|
63
|
+
required: 'GcsSignedGetUrl request should have required property "key".'
|
|
64
|
+
}
|
|
65
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 { type } from '@lowdefy/helpers';
|
|
16
|
+
import getBucket from '../getBucket.js';
|
|
17
|
+
import schema from './schema.js';
|
|
18
|
+
async function GcsSignedPostPolicy({ request, connection }) {
|
|
19
|
+
const { bucket } = connection;
|
|
20
|
+
const { conditions, expires = 3600, fields = {}, key } = request;
|
|
21
|
+
if (type.isObject(fields) === false) {
|
|
22
|
+
throw new Error(`properties.fields must be an object. Received ${JSON.stringify(fields)}.`);
|
|
23
|
+
}
|
|
24
|
+
const options = {
|
|
25
|
+
expires: Date.now() + expires * 1000,
|
|
26
|
+
fields
|
|
27
|
+
};
|
|
28
|
+
if (conditions) {
|
|
29
|
+
options.conditions = conditions;
|
|
30
|
+
}
|
|
31
|
+
const file = getBucket({
|
|
32
|
+
connection
|
|
33
|
+
}).file(key);
|
|
34
|
+
const [policy] = await file.generateSignedPostPolicyV4(options);
|
|
35
|
+
// Top-level key/bucket/method make the response a standard upload-policy
|
|
36
|
+
// descriptor — the client reads object identity from here, never from fields.
|
|
37
|
+
return {
|
|
38
|
+
...policy,
|
|
39
|
+
bucket,
|
|
40
|
+
key,
|
|
41
|
+
method: 'POST'
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
GcsSignedPostPolicy.schema = schema;
|
|
45
|
+
GcsSignedPostPolicy.meta = {
|
|
46
|
+
checkRead: false,
|
|
47
|
+
checkWrite: true
|
|
48
|
+
};
|
|
49
|
+
export default GcsSignedPostPolicy;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 - GcsSignedPostPolicy',
|
|
18
|
+
type: 'object',
|
|
19
|
+
required: [
|
|
20
|
+
'key'
|
|
21
|
+
],
|
|
22
|
+
properties: {
|
|
23
|
+
conditions: {
|
|
24
|
+
type: 'array',
|
|
25
|
+
items: {
|
|
26
|
+
type: 'array'
|
|
27
|
+
},
|
|
28
|
+
description: 'Conditions to be enforced on the request.',
|
|
29
|
+
errorMessage: {
|
|
30
|
+
type: 'GcsSignedPostPolicy request property "conditions" should be a array.'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
expires: {
|
|
34
|
+
type: 'number',
|
|
35
|
+
description: 'Number of seconds for which the policy should be valid.',
|
|
36
|
+
default: 3600,
|
|
37
|
+
errorMessage: {
|
|
38
|
+
type: 'GcsSignedPostPolicy request property "expires" should be a number.'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
fields: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
description: 'Additional form fields to include in the POST policy (e.g. acl).',
|
|
44
|
+
errorMessage: {
|
|
45
|
+
type: 'GcsSignedPostPolicy request property "fields" should be an object.'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
key: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'Key under which object will be stored.',
|
|
51
|
+
errorMessage: {
|
|
52
|
+
type: 'GcsSignedPostPolicy request property "key" should be a string.'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
errorMessage: {
|
|
57
|
+
type: 'GcsSignedPostPolicy request properties should be an object.',
|
|
58
|
+
required: 'GcsSignedPostPolicy request should have required property "key".'
|
|
59
|
+
}
|
|
60
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 GcsGetObject from './GcsGetObject/GcsGetObject.js';
|
|
16
|
+
import GcsPutObject from './GcsPutObject/GcsPutObject.js';
|
|
17
|
+
import GcsSignedGetUrl from './GcsSignedGetUrl/GcsSignedGetUrl.js';
|
|
18
|
+
import GcsSignedPostPolicy from './GcsSignedPostPolicy/GcsSignedPostPolicy.js';
|
|
19
|
+
import schema from './schema.js';
|
|
20
|
+
export default {
|
|
21
|
+
schema,
|
|
22
|
+
requests: {
|
|
23
|
+
GcsGetObject,
|
|
24
|
+
GcsPutObject,
|
|
25
|
+
GcsSignedGetUrl,
|
|
26
|
+
GcsSignedPostPolicy
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 { Storage } from '@google-cloud/storage';
|
|
16
|
+
import { type } from '@lowdefy/helpers';
|
|
17
|
+
function getBucket({ connection }) {
|
|
18
|
+
const { bucket, client_email, private_key, projectId } = connection;
|
|
19
|
+
const config = {};
|
|
20
|
+
if (!type.isNone(projectId)) {
|
|
21
|
+
config.projectId = projectId;
|
|
22
|
+
}
|
|
23
|
+
// Without explicit credentials the client falls back to
|
|
24
|
+
// Application Default Credentials (e.g. the attached service account on GCP).
|
|
25
|
+
if (!type.isNone(client_email) && !type.isNone(private_key)) {
|
|
26
|
+
config.credentials = {
|
|
27
|
+
client_email,
|
|
28
|
+
private_key
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const storage = new Storage(config);
|
|
32
|
+
return storage.bucket(bucket);
|
|
33
|
+
}
|
|
34
|
+
export default getBucket;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 { type } from '@lowdefy/helpers';
|
|
16
|
+
// Stable, non-expiring URL for a public-read object. Public is author-declared,
|
|
17
|
+
// never runtime-checked — a public URL to a private object 403s.
|
|
18
|
+
function getPublicUrl({ connection, key }) {
|
|
19
|
+
const { bucket, publicUrlBase } = connection;
|
|
20
|
+
const encodedKey = key.split('/').map(encodeURIComponent).join('/');
|
|
21
|
+
if (!type.isNone(publicUrlBase)) {
|
|
22
|
+
return `${publicUrlBase.replace(/\/+$/, '')}/${encodedKey}`;
|
|
23
|
+
}
|
|
24
|
+
return `https://storage.googleapis.com/${bucket}/${encodedKey}`;
|
|
25
|
+
}
|
|
26
|
+
export default getPublicUrl;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 - GoogleCloudStorageBucket',
|
|
18
|
+
type: 'object',
|
|
19
|
+
required: [
|
|
20
|
+
'bucket'
|
|
21
|
+
],
|
|
22
|
+
properties: {
|
|
23
|
+
bucket: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'Google Cloud Storage bucket name.',
|
|
26
|
+
errorMessage: {
|
|
27
|
+
type: 'GoogleCloudStorageBucket connection property "bucket" should be a string.'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
client_email: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'The email of your service account. If omitted, Application Default Credentials are used.',
|
|
33
|
+
errorMessage: {
|
|
34
|
+
type: 'GoogleCloudStorageBucket connection property "client_email" should be a string.'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
private_key: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'The private key for your service account. If omitted, Application Default Credentials are used.',
|
|
40
|
+
errorMessage: {
|
|
41
|
+
type: 'GoogleCloudStorageBucket connection property "private_key" should be a string.'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
projectId: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'The Google Cloud project ID the bucket belongs to.',
|
|
47
|
+
errorMessage: {
|
|
48
|
+
type: 'GoogleCloudStorageBucket connection property "projectId" should be a string.'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
publicUrlBase: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
description: 'Base URL used to construct stable public object URLs (e.g. a CDN domain in front of the bucket). Used by download requests when the request sets "public: true".',
|
|
54
|
+
errorMessage: {
|
|
55
|
+
type: 'GoogleCloudStorageBucket connection property "publicUrlBase" should be a string.'
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
read: {
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
default: true,
|
|
61
|
+
description: 'Allow reads from the bucket.',
|
|
62
|
+
errorMessage: {
|
|
63
|
+
type: 'GoogleCloudStorageBucket connection property "read" should be a boolean.'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
write: {
|
|
67
|
+
type: 'boolean',
|
|
68
|
+
default: false,
|
|
69
|
+
description: 'Allow writes to the bucket.',
|
|
70
|
+
errorMessage: {
|
|
71
|
+
type: 'GoogleCloudStorageBucket connection property "write" should be a boolean.'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
errorMessage: {
|
|
76
|
+
type: 'GoogleCloudStorageBucket connection properties should be an object.',
|
|
77
|
+
required: {
|
|
78
|
+
bucket: 'GoogleCloudStorageBucket connection should have required property "bucket".'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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 GoogleCloudStorageBucket } from './connections/GoogleCloudStorageBucket/GoogleCloudStorageBucket.js';
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 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
|
+
connections: [
|
|
17
|
+
'GoogleCloudStorageBucket'
|
|
18
|
+
],
|
|
19
|
+
requests: [
|
|
20
|
+
'GcsGetObject',
|
|
21
|
+
'GcsPutObject',
|
|
22
|
+
'GcsSignedGetUrl',
|
|
23
|
+
'GcsSignedPostPolicy'
|
|
24
|
+
]
|
|
25
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lowdefy/plugin-gcp",
|
|
3
|
+
"version": "0.0.0-experimental-20260707082859",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"description": "Lowdefy Google Cloud Platform connections.",
|
|
6
|
+
"homepage": "https://lowdefy.com",
|
|
7
|
+
"lowdefy": {
|
|
8
|
+
"serverExternalPackages": [
|
|
9
|
+
"@google-cloud/storage"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"lowdefy",
|
|
14
|
+
"lowdefy plugin",
|
|
15
|
+
"google cloud storage"
|
|
16
|
+
],
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/lowdefy/lowdefy/issues"
|
|
19
|
+
},
|
|
20
|
+
"contributors": [
|
|
21
|
+
{
|
|
22
|
+
"name": "Sam Tolmay",
|
|
23
|
+
"url": "https://github.com/SamTolmay"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "Gerrie van Wyk",
|
|
27
|
+
"url": "https://github.com/Gervwyk"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/lowdefy/lowdefy.git"
|
|
33
|
+
},
|
|
34
|
+
"type": "module",
|
|
35
|
+
"exports": {
|
|
36
|
+
"./connections": "./dist/connections.js",
|
|
37
|
+
"./types": "./dist/types.js",
|
|
38
|
+
"./connections/*": "./dist/connections/*",
|
|
39
|
+
"./*": "./dist/*"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist/*"
|
|
43
|
+
],
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@google-cloud/storage": "7.21.0",
|
|
46
|
+
"@lowdefy/helpers": "0.0.0-experimental-20260707082859"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@jest/globals": "28.1.3",
|
|
50
|
+
"@lowdefy/ajv": "0.0.0-experimental-20260707082859",
|
|
51
|
+
"@swc/cli": "0.8.1",
|
|
52
|
+
"@swc/core": "1.15.32",
|
|
53
|
+
"@swc/jest": "0.2.39",
|
|
54
|
+
"jest": "28.1.3"
|
|
55
|
+
},
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --cli-config-file ../../../../.swc-cli.json --copy-files",
|
|
61
|
+
"clean": "rm -rf dist",
|
|
62
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
63
|
+
}
|
|
64
|
+
}
|