@elaraai/east-node-io 0.0.1-beta.9 → 1.0.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/CLA.md +1 -1
- package/CONTRIBUTING.md +3 -3
- package/LICENSE.md +31 -0
- package/README.md +56 -19
- package/dist/{compression → src/compression}/gzip.d.ts +1 -1
- package/dist/src/compression/gzip.d.ts.map +1 -0
- package/dist/{compression → src/compression}/gzip.js +3 -3
- package/dist/src/compression/gzip.js.map +1 -0
- package/dist/{compression → src/compression}/index.d.ts +16 -16
- package/dist/src/compression/index.d.ts.map +1 -0
- package/dist/src/compression/index.js.map +1 -0
- package/dist/{compression → src/compression}/tar.d.ts +2 -2
- package/dist/src/compression/tar.d.ts.map +1 -0
- package/dist/{compression → src/compression}/tar.js +7 -7
- package/dist/src/compression/tar.js.map +1 -0
- package/dist/{compression → src/compression}/types.d.ts +10 -10
- package/dist/src/compression/types.d.ts.map +1 -0
- package/dist/src/compression/types.js.map +1 -0
- package/dist/{compression → src/compression}/zip.d.ts +3 -3
- package/dist/src/compression/zip.d.ts.map +1 -0
- package/dist/{compression → src/compression}/zip.js +4 -4
- package/dist/src/compression/zip.js.map +1 -0
- package/dist/src/connection/index.d.ts.map +1 -0
- package/dist/{connection → src/connection}/index.js +2 -2
- package/dist/src/connection/index.js.map +1 -0
- package/dist/{format → src/format}/index.d.ts +77 -77
- package/dist/src/format/index.d.ts.map +1 -0
- package/dist/src/format/index.js.map +1 -0
- package/dist/{format → src/format}/types.d.ts +53 -53
- package/dist/src/format/types.d.ts.map +1 -0
- package/dist/src/format/types.js.map +1 -0
- package/dist/{format → src/format}/xlsx.d.ts +20 -20
- package/dist/src/format/xlsx.d.ts.map +1 -0
- package/dist/{format → src/format}/xlsx.js +6 -6
- package/dist/src/format/xlsx.js.map +1 -0
- package/dist/{format → src/format}/xml.d.ts +54 -54
- package/dist/src/format/xml.d.ts.map +1 -0
- package/dist/{format → src/format}/xml.js +14 -14
- package/dist/src/format/xml.js.map +1 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js.map +1 -0
- package/dist/{nosql → src/nosql}/index.d.ts +20 -20
- package/dist/src/nosql/index.d.ts.map +1 -0
- package/dist/src/nosql/index.js.map +1 -0
- package/dist/{nosql → src/nosql}/mongodb.d.ts +5 -5
- package/dist/src/nosql/mongodb.d.ts.map +1 -0
- package/dist/{nosql → src/nosql}/mongodb.js +8 -8
- package/dist/src/nosql/mongodb.js.map +1 -0
- package/dist/{nosql → src/nosql}/redis.d.ts +5 -5
- package/dist/src/nosql/redis.d.ts.map +1 -0
- package/dist/{nosql → src/nosql}/redis.js +6 -6
- package/dist/src/nosql/redis.js.map +1 -0
- package/dist/{nosql → src/nosql}/types.d.ts +10 -10
- package/dist/src/nosql/types.d.ts.map +1 -0
- package/dist/src/nosql/types.js.map +1 -0
- package/dist/src/platform.d.ts.map +1 -0
- package/dist/{platform.js → src/platform.js} +2 -0
- package/dist/src/platform.js.map +1 -0
- package/dist/src/sql/access.d.ts +243 -0
- package/dist/src/sql/access.d.ts.map +1 -0
- package/dist/src/sql/access.js +427 -0
- package/dist/src/sql/access.js.map +1 -0
- package/dist/src/sql/index.d.ts +1112 -0
- package/dist/src/sql/index.d.ts.map +1 -0
- package/dist/{sql → src/sql}/index.js +296 -4
- package/dist/src/sql/index.js.map +1 -0
- package/dist/{sql → src/sql}/mysql.d.ts +110 -32
- package/dist/src/sql/mysql.d.ts.map +1 -0
- package/dist/{sql → src/sql}/mysql.js +207 -6
- package/dist/src/sql/mysql.js.map +1 -0
- package/dist/{sql → src/sql}/postgres.d.ts +110 -32
- package/dist/src/sql/postgres.d.ts.map +1 -0
- package/dist/{sql → src/sql}/postgres.js +199 -6
- package/dist/src/sql/postgres.js.map +1 -0
- package/dist/{sql → src/sql}/sqlite.d.ts +108 -30
- package/dist/src/sql/sqlite.d.ts.map +1 -0
- package/dist/{sql → src/sql}/sqlite.js +209 -6
- package/dist/src/sql/sqlite.js.map +1 -0
- package/dist/src/sql/types.d.ts +269 -0
- package/dist/src/sql/types.d.ts.map +1 -0
- package/dist/{sql → src/sql}/types.js +65 -1
- package/dist/src/sql/types.js.map +1 -0
- package/dist/{storage → src/storage}/index.d.ts +63 -63
- package/dist/src/storage/index.d.ts.map +1 -0
- package/dist/{storage → src/storage}/index.js +1 -1
- package/dist/src/storage/index.js.map +1 -0
- package/dist/{storage → src/storage}/s3.d.ts +56 -49
- package/dist/src/storage/s3.d.ts.map +1 -0
- package/dist/{storage → src/storage}/s3.js +24 -15
- package/dist/src/storage/s3.js.map +1 -0
- package/dist/{storage → src/storage}/types.d.ts +18 -18
- package/dist/src/storage/types.d.ts.map +1 -0
- package/dist/src/storage/types.js.map +1 -0
- package/dist/{transfer → src/transfer}/ftp.d.ts +10 -10
- package/dist/src/transfer/ftp.d.ts.map +1 -0
- package/dist/{transfer → src/transfer}/ftp.js +6 -6
- package/dist/src/transfer/ftp.js.map +1 -0
- package/dist/{transfer → src/transfer}/index.d.ts +40 -40
- package/dist/src/transfer/index.d.ts.map +1 -0
- package/dist/src/transfer/index.js.map +1 -0
- package/dist/{transfer → src/transfer}/sftp.d.ts +10 -10
- package/dist/src/transfer/sftp.d.ts.map +1 -0
- package/dist/{transfer → src/transfer}/sftp.js +6 -6
- package/dist/src/transfer/sftp.js.map +1 -0
- package/dist/{transfer → src/transfer}/types.d.ts +15 -15
- package/dist/src/transfer/types.d.ts.map +1 -0
- package/dist/src/transfer/types.js.map +1 -0
- package/package.json +35 -54
- package/dist/compression/gzip.d.ts.map +0 -1
- package/dist/compression/gzip.js.map +0 -1
- package/dist/compression/index.d.ts.map +0 -1
- package/dist/compression/index.js.map +0 -1
- package/dist/compression/tar.d.ts.map +0 -1
- package/dist/compression/tar.js.map +0 -1
- package/dist/compression/types.d.ts.map +0 -1
- package/dist/compression/types.js.map +0 -1
- package/dist/compression/zip.d.ts.map +0 -1
- package/dist/compression/zip.js.map +0 -1
- package/dist/connection/index.d.ts.map +0 -1
- package/dist/connection/index.js.map +0 -1
- package/dist/format/index.d.ts.map +0 -1
- package/dist/format/index.js.map +0 -1
- package/dist/format/types.d.ts.map +0 -1
- package/dist/format/types.js.map +0 -1
- package/dist/format/xlsx.d.ts.map +0 -1
- package/dist/format/xlsx.js.map +0 -1
- package/dist/format/xml.d.ts.map +0 -1
- package/dist/format/xml.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/nosql/index.d.ts.map +0 -1
- package/dist/nosql/index.js.map +0 -1
- package/dist/nosql/mongodb.d.ts.map +0 -1
- package/dist/nosql/mongodb.js.map +0 -1
- package/dist/nosql/redis.d.ts.map +0 -1
- package/dist/nosql/redis.js.map +0 -1
- package/dist/nosql/types.d.ts.map +0 -1
- package/dist/nosql/types.js.map +0 -1
- package/dist/platform.d.ts.map +0 -1
- package/dist/platform.js.map +0 -1
- package/dist/sql/index.d.ts +0 -777
- package/dist/sql/index.d.ts.map +0 -1
- package/dist/sql/index.js.map +0 -1
- package/dist/sql/mysql.d.ts.map +0 -1
- package/dist/sql/mysql.js.map +0 -1
- package/dist/sql/postgres.d.ts.map +0 -1
- package/dist/sql/postgres.js.map +0 -1
- package/dist/sql/sqlite.d.ts.map +0 -1
- package/dist/sql/sqlite.js.map +0 -1
- package/dist/sql/types.d.ts +0 -205
- package/dist/sql/types.d.ts.map +0 -1
- package/dist/sql/types.js.map +0 -1
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/s3.d.ts.map +0 -1
- package/dist/storage/s3.js.map +0 -1
- package/dist/storage/types.d.ts.map +0 -1
- package/dist/storage/types.js.map +0 -1
- package/dist/transfer/ftp.d.ts.map +0 -1
- package/dist/transfer/ftp.js.map +0 -1
- package/dist/transfer/index.d.ts.map +0 -1
- package/dist/transfer/index.js.map +0 -1
- package/dist/transfer/sftp.d.ts.map +0 -1
- package/dist/transfer/sftp.js.map +0 -1
- package/dist/transfer/types.d.ts.map +0 -1
- package/dist/transfer/types.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- /package/dist/{compression → src/compression}/index.js +0 -0
- /package/dist/{compression → src/compression}/types.js +0 -0
- /package/dist/{connection → src/connection}/index.d.ts +0 -0
- /package/dist/{format → src/format}/index.js +0 -0
- /package/dist/{format → src/format}/types.js +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{index.js → src/index.js} +0 -0
- /package/dist/{nosql → src/nosql}/index.js +0 -0
- /package/dist/{nosql → src/nosql}/types.js +0 -0
- /package/dist/{platform.d.ts → src/platform.d.ts} +0 -0
- /package/dist/{storage → src/storage}/types.js +0 -0
- /package/dist/{transfer → src/transfer}/index.js +0 -0
- /package/dist/{transfer → src/transfer}/types.js +0 -0
|
@@ -76,11 +76,11 @@ export declare const Storage: {
|
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
78
|
readonly putObject: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
79
|
-
region: import("@elaraai/east").StringType;
|
|
80
|
-
bucket: import("@elaraai/east").StringType;
|
|
81
|
-
accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
82
|
-
secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
83
|
-
endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
79
|
+
readonly region: import("@elaraai/east").StringType;
|
|
80
|
+
readonly bucket: import("@elaraai/east").StringType;
|
|
81
|
+
readonly accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
82
|
+
readonly secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
83
|
+
readonly endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
84
84
|
}>, import("@elaraai/east").StringType, import("@elaraai/east").BlobType], import("@elaraai/east").NullType>;
|
|
85
85
|
/**
|
|
86
86
|
* Downloads an object from S3.
|
|
@@ -107,11 +107,11 @@ export declare const Storage: {
|
|
|
107
107
|
* ```
|
|
108
108
|
*/
|
|
109
109
|
readonly getObject: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
110
|
-
region: import("@elaraai/east").StringType;
|
|
111
|
-
bucket: import("@elaraai/east").StringType;
|
|
112
|
-
accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
113
|
-
secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
114
|
-
endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
110
|
+
readonly region: import("@elaraai/east").StringType;
|
|
111
|
+
readonly bucket: import("@elaraai/east").StringType;
|
|
112
|
+
readonly accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
113
|
+
readonly secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
114
|
+
readonly endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
115
115
|
}>, import("@elaraai/east").StringType], import("@elaraai/east").BlobType>;
|
|
116
116
|
/**
|
|
117
117
|
* Retrieves object metadata without downloading.
|
|
@@ -139,17 +139,17 @@ export declare const Storage: {
|
|
|
139
139
|
* ```
|
|
140
140
|
*/
|
|
141
141
|
readonly headObject: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
142
|
-
region: import("@elaraai/east").StringType;
|
|
143
|
-
bucket: import("@elaraai/east").StringType;
|
|
144
|
-
accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
145
|
-
secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
146
|
-
endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
142
|
+
readonly region: import("@elaraai/east").StringType;
|
|
143
|
+
readonly bucket: import("@elaraai/east").StringType;
|
|
144
|
+
readonly accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
145
|
+
readonly secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
146
|
+
readonly endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
147
147
|
}>, import("@elaraai/east").StringType], import("@elaraai/east").StructType<{
|
|
148
|
-
key: import("@elaraai/east").StringType;
|
|
149
|
-
size: import("@elaraai/east").IntegerType;
|
|
150
|
-
lastModified: import("@elaraai/east").DateTimeType;
|
|
151
|
-
contentType: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
152
|
-
etag: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
148
|
+
readonly key: import("@elaraai/east").StringType;
|
|
149
|
+
readonly size: import("@elaraai/east").IntegerType;
|
|
150
|
+
readonly lastModified: import("@elaraai/east").DateTimeType;
|
|
151
|
+
readonly contentType: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
152
|
+
readonly etag: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
153
153
|
}>>;
|
|
154
154
|
/**
|
|
155
155
|
* Deletes an object from S3.
|
|
@@ -176,11 +176,11 @@ export declare const Storage: {
|
|
|
176
176
|
* ```
|
|
177
177
|
*/
|
|
178
178
|
readonly deleteObject: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
179
|
-
region: import("@elaraai/east").StringType;
|
|
180
|
-
bucket: import("@elaraai/east").StringType;
|
|
181
|
-
accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
182
|
-
secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
183
|
-
endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
179
|
+
readonly region: import("@elaraai/east").StringType;
|
|
180
|
+
readonly bucket: import("@elaraai/east").StringType;
|
|
181
|
+
readonly accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
182
|
+
readonly secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
183
|
+
readonly endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
184
184
|
}>, import("@elaraai/east").StringType], import("@elaraai/east").NullType>;
|
|
185
185
|
/**
|
|
186
186
|
* Lists objects in an S3 bucket with a prefix.
|
|
@@ -199,7 +199,7 @@ export declare const Storage: {
|
|
|
199
199
|
* endpoint: variant('none', null),
|
|
200
200
|
* });
|
|
201
201
|
*
|
|
202
|
-
* $.return(Storage.S3.listObjects(config, prefix, 100n));
|
|
202
|
+
* $.return(Storage.S3.listObjects(config, prefix, 100n, variant('none', null)));
|
|
203
203
|
* });
|
|
204
204
|
*
|
|
205
205
|
* const compiled = East.compileAsync(listFiles.toIR(), Storage.S3.Implementation);
|
|
@@ -207,21 +207,21 @@ export declare const Storage: {
|
|
|
207
207
|
* ```
|
|
208
208
|
*/
|
|
209
209
|
readonly listObjects: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
210
|
-
region: import("@elaraai/east").StringType;
|
|
211
|
-
bucket: import("@elaraai/east").StringType;
|
|
212
|
-
accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
213
|
-
secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
214
|
-
endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
215
|
-
}>, import("@elaraai/east").StringType, import("@elaraai/east").IntegerType], import("@elaraai/east").StructType<{
|
|
216
|
-
objects: import("@elaraai/east").ArrayType<import("@elaraai/east").StructType<{
|
|
217
|
-
key: import("@elaraai/east").StringType;
|
|
218
|
-
size: import("@elaraai/east").IntegerType;
|
|
219
|
-
lastModified: import("@elaraai/east").DateTimeType;
|
|
220
|
-
contentType: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
221
|
-
etag: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
210
|
+
readonly region: import("@elaraai/east").StringType;
|
|
211
|
+
readonly bucket: import("@elaraai/east").StringType;
|
|
212
|
+
readonly accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
213
|
+
readonly secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
214
|
+
readonly endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
215
|
+
}>, import("@elaraai/east").StringType, import("@elaraai/east").IntegerType, import("@elaraai/east").OptionType<import("@elaraai/east").StringType>], import("@elaraai/east").StructType<{
|
|
216
|
+
readonly objects: import("@elaraai/east").ArrayType<import("@elaraai/east").StructType<{
|
|
217
|
+
readonly key: import("@elaraai/east").StringType;
|
|
218
|
+
readonly size: import("@elaraai/east").IntegerType;
|
|
219
|
+
readonly lastModified: import("@elaraai/east").DateTimeType;
|
|
220
|
+
readonly contentType: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
221
|
+
readonly etag: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
222
222
|
}>>;
|
|
223
|
-
isTruncated: import("@elaraai/east").BooleanType;
|
|
224
|
-
continuationToken: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
223
|
+
readonly isTruncated: import("@elaraai/east").BooleanType;
|
|
224
|
+
readonly continuationToken: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
225
225
|
}>>;
|
|
226
226
|
/**
|
|
227
227
|
* Generates a presigned URL for temporary access to an S3 object.
|
|
@@ -248,11 +248,11 @@ export declare const Storage: {
|
|
|
248
248
|
* ```
|
|
249
249
|
*/
|
|
250
250
|
readonly presignUrl: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
251
|
-
region: import("@elaraai/east").StringType;
|
|
252
|
-
bucket: import("@elaraai/east").StringType;
|
|
253
|
-
accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
254
|
-
secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
255
|
-
endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
251
|
+
readonly region: import("@elaraai/east").StringType;
|
|
252
|
+
readonly bucket: import("@elaraai/east").StringType;
|
|
253
|
+
readonly accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
254
|
+
readonly secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
255
|
+
readonly endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
256
256
|
}>, import("@elaraai/east").StringType, import("@elaraai/east").IntegerType], import("@elaraai/east").StringType>;
|
|
257
257
|
/**
|
|
258
258
|
* Node.js implementation of S3 platform functions.
|
|
@@ -268,35 +268,35 @@ export declare const Storage: {
|
|
|
268
268
|
* S3 connection configuration type.
|
|
269
269
|
*/
|
|
270
270
|
readonly Config: import("@elaraai/east").StructType<{
|
|
271
|
-
region: import("@elaraai/east").StringType;
|
|
272
|
-
bucket: import("@elaraai/east").StringType;
|
|
273
|
-
accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
274
|
-
secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
275
|
-
endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
271
|
+
readonly region: import("@elaraai/east").StringType;
|
|
272
|
+
readonly bucket: import("@elaraai/east").StringType;
|
|
273
|
+
readonly accessKeyId: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
274
|
+
readonly secretAccessKey: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
275
|
+
readonly endpoint: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
276
276
|
}>;
|
|
277
277
|
/**
|
|
278
278
|
* S3 object metadata type.
|
|
279
279
|
*/
|
|
280
280
|
readonly ObjectMetadata: import("@elaraai/east").StructType<{
|
|
281
|
-
key: import("@elaraai/east").StringType;
|
|
282
|
-
size: import("@elaraai/east").IntegerType;
|
|
283
|
-
lastModified: import("@elaraai/east").DateTimeType;
|
|
284
|
-
contentType: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
285
|
-
etag: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
281
|
+
readonly key: import("@elaraai/east").StringType;
|
|
282
|
+
readonly size: import("@elaraai/east").IntegerType;
|
|
283
|
+
readonly lastModified: import("@elaraai/east").DateTimeType;
|
|
284
|
+
readonly contentType: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
285
|
+
readonly etag: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
286
286
|
}>;
|
|
287
287
|
/**
|
|
288
288
|
* S3 list objects result type.
|
|
289
289
|
*/
|
|
290
290
|
readonly ListResult: import("@elaraai/east").StructType<{
|
|
291
|
-
objects: import("@elaraai/east").ArrayType<import("@elaraai/east").StructType<{
|
|
292
|
-
key: import("@elaraai/east").StringType;
|
|
293
|
-
size: import("@elaraai/east").IntegerType;
|
|
294
|
-
lastModified: import("@elaraai/east").DateTimeType;
|
|
295
|
-
contentType: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
296
|
-
etag: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
291
|
+
readonly objects: import("@elaraai/east").ArrayType<import("@elaraai/east").StructType<{
|
|
292
|
+
readonly key: import("@elaraai/east").StringType;
|
|
293
|
+
readonly size: import("@elaraai/east").IntegerType;
|
|
294
|
+
readonly lastModified: import("@elaraai/east").DateTimeType;
|
|
295
|
+
readonly contentType: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
296
|
+
readonly etag: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
297
297
|
}>>;
|
|
298
|
-
isTruncated: import("@elaraai/east").BooleanType;
|
|
299
|
-
continuationToken: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
298
|
+
readonly isTruncated: import("@elaraai/east").BooleanType;
|
|
299
|
+
readonly continuationToken: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
|
|
300
300
|
}>;
|
|
301
301
|
};
|
|
302
302
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAGH,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAkB3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,OAAO;IAChB;;;;;OAKG;;QAEC;;;;;;;;;;;;;;;;;;;;;;;WAuBG;;;;;;;;QAGH;;;;;;;;;;;;;;;;;;;;;;;WAuBG;;;;;;;;QAGH;;;;;;;;;;;;;;;;;;;;;;;;WAwBG;;;;;;;;;;;;;;QAGH;;;;;;;;;;;;;;;;;;;;;;;WAuBG;;;;;;;;QAGH;;;;;;;;;;;;;;;;;;;;;;;WAuBG;;;;;;;;;;;;;;;;;;QAGH;;;;;;;;;;;;;;;;;;;;;;;WAuBG;;;;;;;;QAGH;;;;WAIG;;QAGH;;WAEG;;YAEC;;eAEG;;;;;;;;YAGH;;eAEG;;;;;;;;YAGH;;eAEG;;;;;;;;;;;;;;CAIL,CAAC"}
|
|
@@ -173,7 +173,7 @@ export const Storage = {
|
|
|
173
173
|
* endpoint: variant('none', null),
|
|
174
174
|
* });
|
|
175
175
|
*
|
|
176
|
-
* $.return(Storage.S3.listObjects(config, prefix, 100n));
|
|
176
|
+
* $.return(Storage.S3.listObjects(config, prefix, 100n, variant('none', null)));
|
|
177
177
|
* });
|
|
178
178
|
*
|
|
179
179
|
* const compiled = East.compileAsync(listFiles.toIR(), Storage.S3.Implementation);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,4BAA4B;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAE3B,6BAA6B;AAC7B,OAAO,EACH,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,MAAM,EACT,MAAM,SAAS,CAAC;AACjB,OAAO,EACH,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EACnB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB;;;;;OAKG;IACH,EAAE,EAAE;QACA;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,SAAS,EAAE,aAAa;QAExB;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,SAAS,EAAE,aAAa;QAExB;;;;;;;;;;;;;;;;;;;;;;;;WAwBG;QACH,UAAU,EAAE,cAAc;QAE1B;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,YAAY,EAAE,gBAAgB;QAE9B;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,WAAW,EAAE,eAAe;QAE5B;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,UAAU,EAAE,cAAc;QAE1B;;;;WAIG;QACH,cAAc,EAAE,MAAM;QAEtB;;WAEG;QACH,KAAK,EAAE;YACH;;eAEG;YACH,MAAM,EAAE,YAAY;YAEpB;;eAEG;YACH,cAAc,EAAE,oBAAoB;YAEpC;;eAEG;YACH,UAAU,EAAE,gBAAgB;SAC/B;KACJ;CACK,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
*/
|
|
13
|
-
import { BlobType, StringType, IntegerType, NullType } from "@elaraai/east";
|
|
13
|
+
import { BlobType, StringType, IntegerType, NullType, OptionType } from "@elaraai/east";
|
|
14
14
|
import type { PlatformFunction } from "@elaraai/east/internal";
|
|
15
15
|
/**
|
|
16
16
|
* Uploads an object to S3.
|
|
@@ -63,11 +63,11 @@ import type { PlatformFunction } from "@elaraai/east/internal";
|
|
|
63
63
|
* - All operations are asynchronous (use East.compileAsync)
|
|
64
64
|
*/
|
|
65
65
|
export declare const s3_put_object: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
66
|
-
region: StringType;
|
|
67
|
-
bucket: StringType;
|
|
68
|
-
accessKeyId:
|
|
69
|
-
secretAccessKey:
|
|
70
|
-
endpoint:
|
|
66
|
+
readonly region: StringType;
|
|
67
|
+
readonly bucket: StringType;
|
|
68
|
+
readonly accessKeyId: OptionType<StringType>;
|
|
69
|
+
readonly secretAccessKey: OptionType<StringType>;
|
|
70
|
+
readonly endpoint: OptionType<StringType>;
|
|
71
71
|
}>, StringType, BlobType], NullType>;
|
|
72
72
|
/**
|
|
73
73
|
* Downloads an object from S3.
|
|
@@ -116,11 +116,11 @@ export declare const s3_put_object: import("@elaraai/east").AsyncPlatformDefinit
|
|
|
116
116
|
* - Streams large objects automatically
|
|
117
117
|
*/
|
|
118
118
|
export declare const s3_get_object: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
119
|
-
region: StringType;
|
|
120
|
-
bucket: StringType;
|
|
121
|
-
accessKeyId:
|
|
122
|
-
secretAccessKey:
|
|
123
|
-
endpoint:
|
|
119
|
+
readonly region: StringType;
|
|
120
|
+
readonly bucket: StringType;
|
|
121
|
+
readonly accessKeyId: OptionType<StringType>;
|
|
122
|
+
readonly secretAccessKey: OptionType<StringType>;
|
|
123
|
+
readonly endpoint: OptionType<StringType>;
|
|
124
124
|
}>, StringType], BlobType>;
|
|
125
125
|
/**
|
|
126
126
|
* Retrieves object metadata from S3 without downloading the file.
|
|
@@ -179,17 +179,17 @@ export declare const s3_get_object: import("@elaraai/east").AsyncPlatformDefinit
|
|
|
179
179
|
* - Use this to implement efficient sync/caching logic
|
|
180
180
|
*/
|
|
181
181
|
export declare const s3_head_object: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
182
|
-
region: StringType;
|
|
183
|
-
bucket: StringType;
|
|
184
|
-
accessKeyId:
|
|
185
|
-
secretAccessKey:
|
|
186
|
-
endpoint:
|
|
182
|
+
readonly region: StringType;
|
|
183
|
+
readonly bucket: StringType;
|
|
184
|
+
readonly accessKeyId: OptionType<StringType>;
|
|
185
|
+
readonly secretAccessKey: OptionType<StringType>;
|
|
186
|
+
readonly endpoint: OptionType<StringType>;
|
|
187
187
|
}>, StringType], import("@elaraai/east").StructType<{
|
|
188
|
-
key: StringType;
|
|
189
|
-
size: IntegerType;
|
|
190
|
-
lastModified: import("@elaraai/east").DateTimeType;
|
|
191
|
-
contentType:
|
|
192
|
-
etag:
|
|
188
|
+
readonly key: StringType;
|
|
189
|
+
readonly size: IntegerType;
|
|
190
|
+
readonly lastModified: import("@elaraai/east").DateTimeType;
|
|
191
|
+
readonly contentType: OptionType<StringType>;
|
|
192
|
+
readonly etag: OptionType<StringType>;
|
|
193
193
|
}>>;
|
|
194
194
|
/**
|
|
195
195
|
* Deletes an object from S3.
|
|
@@ -236,17 +236,18 @@ export declare const s3_head_object: import("@elaraai/east").AsyncPlatformDefini
|
|
|
236
236
|
* - Does not delete versioned objects (only current version)
|
|
237
237
|
*/
|
|
238
238
|
export declare const s3_delete_object: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
239
|
-
region: StringType;
|
|
240
|
-
bucket: StringType;
|
|
241
|
-
accessKeyId:
|
|
242
|
-
secretAccessKey:
|
|
243
|
-
endpoint:
|
|
239
|
+
readonly region: StringType;
|
|
240
|
+
readonly bucket: StringType;
|
|
241
|
+
readonly accessKeyId: OptionType<StringType>;
|
|
242
|
+
readonly secretAccessKey: OptionType<StringType>;
|
|
243
|
+
readonly endpoint: OptionType<StringType>;
|
|
244
244
|
}>, StringType], NullType>;
|
|
245
245
|
/**
|
|
246
246
|
* Lists objects in an S3 bucket with a prefix.
|
|
247
247
|
*
|
|
248
248
|
* Retrieves metadata for objects matching a prefix, with pagination support.
|
|
249
|
-
* Returns up to `maxKeys` objects per request.
|
|
249
|
+
* Returns up to `maxKeys` objects per request. Pass a continuation token
|
|
250
|
+
* from a previous result to fetch the next page.
|
|
250
251
|
*
|
|
251
252
|
* This is a platform function for the East language, enabling S3 object storage
|
|
252
253
|
* operations in East programs running on Node.js.
|
|
@@ -254,6 +255,7 @@ export declare const s3_delete_object: import("@elaraai/east").AsyncPlatformDefi
|
|
|
254
255
|
* @param config - S3 configuration
|
|
255
256
|
* @param prefix - Prefix to filter objects (empty string for all objects)
|
|
256
257
|
* @param maxKeys - Maximum number of objects to return (1-1000)
|
|
258
|
+
* @param continuationToken - Continuation token from a previous list result for pagination (None for first page)
|
|
257
259
|
* @returns List result with objects and pagination info
|
|
258
260
|
*
|
|
259
261
|
* @throws {EastError} When listing fails due to:
|
|
@@ -277,8 +279,12 @@ export declare const s3_delete_object: import("@elaraai/east").AsyncPlatformDefi
|
|
|
277
279
|
* endpoint: East.none(),
|
|
278
280
|
* });
|
|
279
281
|
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
+
* // First page
|
|
283
|
+
* const result = $.let(Storage.S3.listObjects(config, "reports/", 100n, East.none()));
|
|
284
|
+
*
|
|
285
|
+
* // Next page using continuation token
|
|
286
|
+
* const page2 = $.let(Storage.S3.listObjects(config, "reports/", 100n, result.continuationToken));
|
|
287
|
+
* return page2.objects;
|
|
282
288
|
* });
|
|
283
289
|
*
|
|
284
290
|
* const compiled = East.compileAsync(listReports.toIR(), Storage.S3.Implementation);
|
|
@@ -287,25 +293,26 @@ export declare const s3_delete_object: import("@elaraai/east").AsyncPlatformDefi
|
|
|
287
293
|
*
|
|
288
294
|
* @remarks
|
|
289
295
|
* - Returns objects sorted by key (lexicographically)
|
|
290
|
-
* -
|
|
296
|
+
* - Pass the `continuationToken` from the result to fetch the next page
|
|
297
|
+
* - When `isTruncated` is false, there are no more pages
|
|
291
298
|
* - maxKeys is clamped to 1-1000 range
|
|
292
299
|
*/
|
|
293
300
|
export declare const s3_list_objects: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
294
|
-
region: StringType;
|
|
295
|
-
bucket: StringType;
|
|
296
|
-
accessKeyId:
|
|
297
|
-
secretAccessKey:
|
|
298
|
-
endpoint:
|
|
299
|
-
}>, StringType, IntegerType], import("@elaraai/east").StructType<{
|
|
300
|
-
objects: import("@elaraai/east").ArrayType<import("@elaraai/east").StructType<{
|
|
301
|
-
key: StringType;
|
|
302
|
-
size: IntegerType;
|
|
303
|
-
lastModified: import("@elaraai/east").DateTimeType;
|
|
304
|
-
contentType:
|
|
305
|
-
etag:
|
|
301
|
+
readonly region: StringType;
|
|
302
|
+
readonly bucket: StringType;
|
|
303
|
+
readonly accessKeyId: OptionType<StringType>;
|
|
304
|
+
readonly secretAccessKey: OptionType<StringType>;
|
|
305
|
+
readonly endpoint: OptionType<StringType>;
|
|
306
|
+
}>, StringType, IntegerType, OptionType<StringType>], import("@elaraai/east").StructType<{
|
|
307
|
+
readonly objects: import("@elaraai/east").ArrayType<import("@elaraai/east").StructType<{
|
|
308
|
+
readonly key: StringType;
|
|
309
|
+
readonly size: IntegerType;
|
|
310
|
+
readonly lastModified: import("@elaraai/east").DateTimeType;
|
|
311
|
+
readonly contentType: OptionType<StringType>;
|
|
312
|
+
readonly etag: OptionType<StringType>;
|
|
306
313
|
}>>;
|
|
307
|
-
isTruncated: import("@elaraai/east").BooleanType;
|
|
308
|
-
continuationToken:
|
|
314
|
+
readonly isTruncated: import("@elaraai/east").BooleanType;
|
|
315
|
+
readonly continuationToken: OptionType<StringType>;
|
|
309
316
|
}>>;
|
|
310
317
|
/**
|
|
311
318
|
* Generates a presigned URL for temporary access to an S3 object.
|
|
@@ -357,11 +364,11 @@ export declare const s3_list_objects: import("@elaraai/east").AsyncPlatformDefin
|
|
|
357
364
|
* - Maximum expiration: 7 days (604800 seconds)
|
|
358
365
|
*/
|
|
359
366
|
export declare const s3_presign_url: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").StructType<{
|
|
360
|
-
region: StringType;
|
|
361
|
-
bucket: StringType;
|
|
362
|
-
accessKeyId:
|
|
363
|
-
secretAccessKey:
|
|
364
|
-
endpoint:
|
|
367
|
+
readonly region: StringType;
|
|
368
|
+
readonly bucket: StringType;
|
|
369
|
+
readonly accessKeyId: OptionType<StringType>;
|
|
370
|
+
readonly secretAccessKey: OptionType<StringType>;
|
|
371
|
+
readonly endpoint: OptionType<StringType>;
|
|
365
372
|
}>, StringType, IntegerType], StringType>;
|
|
366
373
|
/**
|
|
367
374
|
* Node.js implementation of S3 platform functions.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../../src/storage/s3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAQ,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAW,MAAM,eAAe,CAAC;AAEvG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AA+C/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,aAAa;;;;;;oCAAsF,CAAC;AAEjH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,aAAa;;;;;;0BAA4E,CAAC;AACvG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;GAAyF,CAAC;AAErH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,gBAAgB;;;;;;0BAA+E,CAAC;AAE7G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;GAA2H,CAAC;AAExJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,cAAc;;;;;;yCAA4F,CAAC;AAExH;;;;;GAKG;AACH,eAAO,MAAM,MAAM,EAAE,gBAAgB,EA8LpC,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
*/
|
|
13
|
-
import { East, BlobType, StringType, IntegerType, NullType, variant } from "@elaraai/east";
|
|
13
|
+
import { East, BlobType, StringType, IntegerType, NullType, OptionType, variant } from "@elaraai/east";
|
|
14
14
|
import { EastError } from "@elaraai/east/internal";
|
|
15
15
|
import { S3Client, PutObjectCommand, GetObjectCommand, DeleteObjectCommand, ListObjectsV2Command, HeadObjectCommand, } from "@aws-sdk/client-s3";
|
|
16
16
|
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
|
@@ -245,7 +245,8 @@ export const s3_delete_object = East.asyncPlatform("s3_delete_object", [S3Config
|
|
|
245
245
|
* Lists objects in an S3 bucket with a prefix.
|
|
246
246
|
*
|
|
247
247
|
* Retrieves metadata for objects matching a prefix, with pagination support.
|
|
248
|
-
* Returns up to `maxKeys` objects per request.
|
|
248
|
+
* Returns up to `maxKeys` objects per request. Pass a continuation token
|
|
249
|
+
* from a previous result to fetch the next page.
|
|
249
250
|
*
|
|
250
251
|
* This is a platform function for the East language, enabling S3 object storage
|
|
251
252
|
* operations in East programs running on Node.js.
|
|
@@ -253,6 +254,7 @@ export const s3_delete_object = East.asyncPlatform("s3_delete_object", [S3Config
|
|
|
253
254
|
* @param config - S3 configuration
|
|
254
255
|
* @param prefix - Prefix to filter objects (empty string for all objects)
|
|
255
256
|
* @param maxKeys - Maximum number of objects to return (1-1000)
|
|
257
|
+
* @param continuationToken - Continuation token from a previous list result for pagination (None for first page)
|
|
256
258
|
* @returns List result with objects and pagination info
|
|
257
259
|
*
|
|
258
260
|
* @throws {EastError} When listing fails due to:
|
|
@@ -276,8 +278,12 @@ export const s3_delete_object = East.asyncPlatform("s3_delete_object", [S3Config
|
|
|
276
278
|
* endpoint: East.none(),
|
|
277
279
|
* });
|
|
278
280
|
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
+
* // First page
|
|
282
|
+
* const result = $.let(Storage.S3.listObjects(config, "reports/", 100n, East.none()));
|
|
283
|
+
*
|
|
284
|
+
* // Next page using continuation token
|
|
285
|
+
* const page2 = $.let(Storage.S3.listObjects(config, "reports/", 100n, result.continuationToken));
|
|
286
|
+
* return page2.objects;
|
|
281
287
|
* });
|
|
282
288
|
*
|
|
283
289
|
* const compiled = East.compileAsync(listReports.toIR(), Storage.S3.Implementation);
|
|
@@ -286,10 +292,11 @@ export const s3_delete_object = East.asyncPlatform("s3_delete_object", [S3Config
|
|
|
286
292
|
*
|
|
287
293
|
* @remarks
|
|
288
294
|
* - Returns objects sorted by key (lexicographically)
|
|
289
|
-
* -
|
|
295
|
+
* - Pass the `continuationToken` from the result to fetch the next page
|
|
296
|
+
* - When `isTruncated` is false, there are no more pages
|
|
290
297
|
* - maxKeys is clamped to 1-1000 range
|
|
291
298
|
*/
|
|
292
|
-
export const s3_list_objects = East.asyncPlatform("s3_list_objects", [S3ConfigType, StringType, IntegerType], S3ListResultType);
|
|
299
|
+
export const s3_list_objects = East.asyncPlatform("s3_list_objects", [S3ConfigType, StringType, IntegerType, OptionType(StringType)], S3ListResultType);
|
|
293
300
|
/**
|
|
294
301
|
* Generates a presigned URL for temporary access to an S3 object.
|
|
295
302
|
*
|
|
@@ -360,7 +367,7 @@ export const S3Impl = [
|
|
|
360
367
|
}
|
|
361
368
|
catch (err) {
|
|
362
369
|
throw new EastError(`S3 putObject failed: ${err.message}`, {
|
|
363
|
-
location: { filename: "s3_put_object", line: 0n, column: 0n },
|
|
370
|
+
location: [{ filename: "s3_put_object", line: 0n, column: 0n }],
|
|
364
371
|
cause: err
|
|
365
372
|
});
|
|
366
373
|
}
|
|
@@ -393,7 +400,7 @@ export const S3Impl = [
|
|
|
393
400
|
}
|
|
394
401
|
catch (err) {
|
|
395
402
|
throw new EastError(`S3 getObject failed: ${err.message}`, {
|
|
396
|
-
location: { filename: "s3_get_object", line: 0n, column: 0n },
|
|
403
|
+
location: [{ filename: "s3_get_object", line: 0n, column: 0n }],
|
|
397
404
|
cause: err
|
|
398
405
|
});
|
|
399
406
|
}
|
|
@@ -416,7 +423,7 @@ export const S3Impl = [
|
|
|
416
423
|
}
|
|
417
424
|
catch (err) {
|
|
418
425
|
throw new EastError(`S3 headObject failed: ${err.message}`, {
|
|
419
|
-
location: { filename: "s3_head_object", line: 0n, column: 0n },
|
|
426
|
+
location: [{ filename: "s3_head_object", line: 0n, column: 0n }],
|
|
420
427
|
cause: err
|
|
421
428
|
});
|
|
422
429
|
}
|
|
@@ -433,22 +440,24 @@ export const S3Impl = [
|
|
|
433
440
|
}
|
|
434
441
|
catch (err) {
|
|
435
442
|
throw new EastError(`S3 deleteObject failed: ${err.message}`, {
|
|
436
|
-
location: { filename: "s3_delete_object", line: 0n, column: 0n },
|
|
443
|
+
location: [{ filename: "s3_delete_object", line: 0n, column: 0n }],
|
|
437
444
|
cause: err
|
|
438
445
|
});
|
|
439
446
|
}
|
|
440
447
|
}),
|
|
441
|
-
s3_list_objects.implement(async (config, prefix, maxKeys) => {
|
|
448
|
+
s3_list_objects.implement(async (config, prefix, maxKeys, continuationToken) => {
|
|
442
449
|
try {
|
|
443
450
|
const client = createS3Client(config);
|
|
444
451
|
// Clamp maxKeys to valid range (1-1000)
|
|
445
452
|
const maxKeysNum = Number(maxKeys);
|
|
446
453
|
const clampedMaxKeys = Math.max(1, Math.min(1000, maxKeysNum));
|
|
447
|
-
const
|
|
454
|
+
const commandInput = {
|
|
448
455
|
Bucket: config.bucket,
|
|
449
456
|
Prefix: prefix,
|
|
450
457
|
MaxKeys: clampedMaxKeys,
|
|
451
|
-
|
|
458
|
+
ContinuationToken: continuationToken.type === 'some' ? continuationToken.value : undefined,
|
|
459
|
+
};
|
|
460
|
+
const command = new ListObjectsV2Command(commandInput);
|
|
452
461
|
const response = await client.send(command);
|
|
453
462
|
// Convert S3 objects to East metadata format
|
|
454
463
|
// Note: ContentType is not part of _Object in ListObjectsV2, only in HeadObject/GetObject
|
|
@@ -471,7 +480,7 @@ export const S3Impl = [
|
|
|
471
480
|
}
|
|
472
481
|
catch (err) {
|
|
473
482
|
throw new EastError(`S3 listObjects failed: ${err.message}`, {
|
|
474
|
-
location: { filename: "s3_list_objects", line: 0n, column: 0n },
|
|
483
|
+
location: [{ filename: "s3_list_objects", line: 0n, column: 0n }],
|
|
475
484
|
cause: err
|
|
476
485
|
});
|
|
477
486
|
}
|
|
@@ -493,7 +502,7 @@ export const S3Impl = [
|
|
|
493
502
|
}
|
|
494
503
|
catch (err) {
|
|
495
504
|
throw new EastError(`S3 presignUrl failed: ${err.message}`, {
|
|
496
|
-
location: { filename: "s3_presign_url", line: 0n, column: 0n },
|
|
505
|
+
location: [{ filename: "s3_presign_url", line: 0n, column: 0n }],
|
|
497
506
|
cause: err
|
|
498
507
|
});
|
|
499
508
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s3.js","sourceRoot":"","sources":["../../../src/storage/s3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGvG,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACH,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,GAGpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY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