@sqlrooms/s3-browser-config 0.26.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright 2025 Ilya Boyandin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ This package is part of the SQLRooms framework.
2
+
3
+ # S3 browser config
4
+
5
+ Zod schema definitions for `@sqlrooms/s3-browser`
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const S3Config: z.ZodObject<{
3
+ accessKeyId: z.ZodString;
4
+ secretAccessKey: z.ZodString;
5
+ region: z.ZodString;
6
+ bucket: z.ZodString;
7
+ name: z.ZodOptional<z.ZodString>;
8
+ sessionToken: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ export type S3Config = z.infer<typeof S3Config>;
11
+ export declare const S3Credentials: z.ZodObject<{
12
+ name: z.ZodString;
13
+ accessKeyId: z.ZodString;
14
+ secretAccessKey: z.ZodString;
15
+ region: z.ZodString;
16
+ bucket: z.ZodString;
17
+ sessionToken: z.ZodOptional<z.ZodString>;
18
+ id: z.ZodString;
19
+ createdAt: z.ZodString;
20
+ updatedAt: z.ZodString;
21
+ }, z.core.$strip>;
22
+ export type S3Credentials = z.infer<typeof S3Credentials>;
23
+ //# sourceMappingURL=S3Credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"S3Credentials.d.ts","sourceRoot":"","sources":["../src/S3Credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,QAAQ;;;;;;;iBAOnB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,eAAO,MAAM,aAAa;;;;;;;;;;iBAUxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export const S3Config = z.object({
3
+ accessKeyId: z.string().min(1, 'Access Key ID is required'),
4
+ secretAccessKey: z.string().min(1, 'Secret Access Key is required'),
5
+ region: z.string().min(1, 'Region is required'),
6
+ bucket: z.string().min(1, 'Bucket name is required'),
7
+ name: z.string().optional(), // Optional for saving
8
+ sessionToken: z.string().optional(), // Optional for temporary credentials
9
+ });
10
+ export const S3Credentials = z.object({
11
+ name: z.string().min(1, 'Name is required'),
12
+ accessKeyId: z.string().min(1, 'Access Key ID is required'),
13
+ secretAccessKey: z.string().min(1, 'Secret Access Key is required'),
14
+ region: z.string().min(1, 'Region is required'),
15
+ bucket: z.string().min(1, 'Bucket name is required'),
16
+ sessionToken: z.string().optional(), // Optional for temporary credentials
17
+ id: z.string().uuid('Invalid ID format'),
18
+ createdAt: z.string().datetime('Invalid date format'),
19
+ updatedAt: z.string().datetime('Invalid date format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C,CAAC,EAAE,yBAAyB,CAAC;IACpD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,qCAAqC;IAC1E,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC;IACxC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACrD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;CACtD,CAAC,CAAC","sourcesContent":["import {z} from 'zod';\n\nexport const S3Config = z.object({\n accessKeyId: z.string().min(1, 'Access Key ID is required'),\n secretAccessKey: z.string().min(1, 'Secret Access Key is required'),\n region: z.string().min(1, 'Region is required'),\n bucket: z.string().min(1, 'Bucket name is required'),\n name: z.string().optional(), // Optional for saving\n sessionToken: z.string().optional(), // Optional for temporary credentials\n});\n\nexport type S3Config = z.infer<typeof S3Config>;\n\nexport const S3Credentials = z.object({\n name: z.string().min(1, 'Name is required'),\n accessKeyId: z.string().min(1, 'Access Key ID is required'),\n secretAccessKey: z.string().min(1, 'Secret Access Key is required'),\n region: z.string().min(1, 'Region is required'),\n bucket: z.string().min(1, 'Bucket name is required'),\n sessionToken: z.string().optional(), // Optional for temporary credentials\n id: z.string().uuid('Invalid ID format'),\n createdAt: z.string().datetime('Invalid date format'),\n updatedAt: z.string().datetime('Invalid date format'),\n});\n\nexport type S3Credentials = z.infer<typeof S3Credentials>;\n"]}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const S3FileOrDirectory: z.ZodUnion<readonly [z.ZodObject<{
3
+ key: z.ZodString;
4
+ isDirectory: z.ZodLiteral<true>;
5
+ }, z.core.$strip>, z.ZodObject<{
6
+ key: z.ZodString;
7
+ isDirectory: z.ZodLiteral<false>;
8
+ lastModified: z.ZodOptional<z.ZodDate>;
9
+ size: z.ZodOptional<z.ZodNumber>;
10
+ contentType: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>]>;
12
+ export type S3FileOrDirectory = z.infer<typeof S3FileOrDirectory>;
13
+ //# sourceMappingURL=S3FileOrDirectory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"S3FileOrDirectory.d.ts","sourceRoot":"","sources":["../src/S3FileOrDirectory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,iBAAiB;;;;;;;;;mBAY5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ export const S3FileOrDirectory = z.union([
3
+ z.object({
4
+ key: z.string(),
5
+ isDirectory: z.literal(true),
6
+ }),
7
+ z.object({
8
+ key: z.string(),
9
+ isDirectory: z.literal(false),
10
+ lastModified: z.date().optional(),
11
+ size: z.number().optional(),
12
+ contentType: z.string().optional(),
13
+ }),
14
+ ]);
15
+ //# sourceMappingURL=S3FileOrDirectory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"S3FileOrDirectory.js","sourceRoot":"","sources":["../src/S3FileOrDirectory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC;IACvC,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;KAC7B,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QAC7B,YAAY,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;QACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC;CACH,CAAC,CAAC","sourcesContent":["import {z} from 'zod';\n\nexport const S3FileOrDirectory = z.union([\n z.object({\n key: z.string(),\n isDirectory: z.literal(true),\n }),\n z.object({\n key: z.string(),\n isDirectory: z.literal(false),\n lastModified: z.date().optional(),\n size: z.number().optional(),\n contentType: z.string().optional(),\n }),\n]);\nexport type S3FileOrDirectory = z.infer<typeof S3FileOrDirectory>;\n"]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * {@include ../README.md}
3
+ * @packageDocumentation
4
+ */
5
+ export * from './S3FileOrDirectory';
6
+ export * from './S3Credentials';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * {@include ../README.md}
3
+ * @packageDocumentation
4
+ */
5
+ export * from './S3FileOrDirectory';
6
+ export * from './S3Credentials';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC","sourcesContent":["/**\n * {@include ../README.md}\n * @packageDocumentation\n */\nexport * from './S3FileOrDirectory';\nexport * from './S3Credentials';\n"]}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@sqlrooms/s3-browser-config",
3
+ "version": "0.26.1-rc.1",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "module": "dist/index.js",
7
+ "type": "module",
8
+ "author": "Ilya Boyandin <ilya@boyandin.me>",
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/sqlrooms/sqlrooms.git"
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "dependencies": {
21
+ "zod": "^4.1.8"
22
+ },
23
+ "scripts": {
24
+ "dev": "tsc -w",
25
+ "build": "tsc",
26
+ "lint": "eslint .",
27
+ "typedoc": "typedoc"
28
+ },
29
+ "gitHead": "e41ac3e033289faaaab0c2dbce552f1a7d0aea2b"
30
+ }