@dimah-s3/db 1.7.1 → 2.0.0-beta.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.
Files changed (120) hide show
  1. package/README.md +62 -17
  2. package/dist/adapters/drizzle.d.ts +7 -0
  3. package/dist/adapters/drizzle.d.ts.map +1 -0
  4. package/dist/adapters/drizzle.js +3 -0
  5. package/dist/adapters/drizzle.js.map +1 -0
  6. package/dist/adapters/kysely.d.ts +7 -0
  7. package/dist/adapters/kysely.d.ts.map +1 -0
  8. package/dist/adapters/kysely.js +3 -0
  9. package/dist/adapters/kysely.js.map +1 -0
  10. package/dist/adapters/prisma.d.ts +7 -0
  11. package/dist/adapters/prisma.d.ts.map +1 -0
  12. package/dist/adapters/prisma.js +3 -0
  13. package/dist/adapters/prisma.js.map +1 -0
  14. package/dist/cli.d.ts +33 -4
  15. package/dist/cli.d.ts.map +1 -1
  16. package/dist/cli.js +192 -4
  17. package/dist/cli.js.map +1 -1
  18. package/dist/client/db-client.d.ts +9 -85
  19. package/dist/client/db-client.d.ts.map +1 -1
  20. package/dist/client/db-object-source.d.ts +25 -0
  21. package/dist/client/db-object-source.d.ts.map +1 -0
  22. package/dist/client/index.d.ts +3 -3
  23. package/dist/client/index.d.ts.map +1 -1
  24. package/dist/client/index.js +96 -42
  25. package/dist/client/index.js.map +1 -1
  26. package/dist/drizzle/mysql.d.ts +1024 -0
  27. package/dist/drizzle/mysql.d.ts.map +1 -0
  28. package/dist/drizzle/mysql.js +123 -0
  29. package/dist/drizzle/mysql.js.map +1 -0
  30. package/dist/drizzle/pg.d.ts +963 -0
  31. package/dist/drizzle/pg.d.ts.map +1 -0
  32. package/dist/drizzle/pg.js +104 -0
  33. package/dist/drizzle/pg.js.map +1 -0
  34. package/dist/drizzle/shared.d.ts +16 -0
  35. package/dist/drizzle/shared.d.ts.map +1 -0
  36. package/dist/drizzle/sqlite.d.ts +1023 -0
  37. package/dist/drizzle/sqlite.d.ts.map +1 -0
  38. package/dist/drizzle/sqlite.js +107 -0
  39. package/dist/drizzle/sqlite.js.map +1 -0
  40. package/dist/folder-path.d.ts +32 -0
  41. package/dist/folder-path.d.ts.map +1 -0
  42. package/dist/fuma-db.d.ts +47 -5
  43. package/dist/fuma-db.d.ts.map +1 -1
  44. package/dist/index.d.ts +9 -13
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +1452 -620
  47. package/dist/index.js.map +1 -1
  48. package/dist/plugin/create-database-endpoints.d.ts +105 -21
  49. package/dist/plugin/create-database-endpoints.d.ts.map +1 -1
  50. package/dist/plugin/create-database-lifecycle-hooks.d.ts +37 -19
  51. package/dist/plugin/create-database-lifecycle-hooks.d.ts.map +1 -1
  52. package/dist/plugin/db.d.ts +29 -118
  53. package/dist/plugin/db.d.ts.map +1 -1
  54. package/dist/plugin/object-access.d.ts +46 -0
  55. package/dist/plugin/object-access.d.ts.map +1 -0
  56. package/dist/plugin/public-stores.d.ts +33 -0
  57. package/dist/plugin/public-stores.d.ts.map +1 -0
  58. package/dist/plugin/purge.d.ts +49 -0
  59. package/dist/plugin/purge.d.ts.map +1 -0
  60. package/dist/plugin/quota.d.ts +25 -0
  61. package/dist/plugin/quota.d.ts.map +1 -0
  62. package/dist/plugin/schemas.d.ts +69 -0
  63. package/dist/plugin/schemas.d.ts.map +1 -0
  64. package/dist/plugin/scope.d.ts +31 -0
  65. package/dist/plugin/scope.d.ts.map +1 -0
  66. package/dist/plugin/to-db-client-object.d.ts +8 -4
  67. package/dist/plugin/to-db-client-object.d.ts.map +1 -1
  68. package/dist/schema/v1.d.ts +1 -8
  69. package/dist/schema/v1.d.ts.map +1 -1
  70. package/dist/schema/v2.d.ts +64 -0
  71. package/dist/schema/v2.d.ts.map +1 -0
  72. package/dist/standard-schema.d.ts +42 -0
  73. package/dist/standard-schema.d.ts.map +1 -0
  74. package/dist/store/create-db-store.d.ts +17 -0
  75. package/dist/store/create-db-store.d.ts.map +1 -0
  76. package/dist/store/folder-store.d.ts +36 -0
  77. package/dist/store/folder-store.d.ts.map +1 -0
  78. package/dist/store/list-cursor.d.ts +26 -4
  79. package/dist/store/list-cursor.d.ts.map +1 -1
  80. package/dist/store/map-row.d.ts +17 -8
  81. package/dist/store/map-row.d.ts.map +1 -1
  82. package/dist/store/object-store.d.ts +208 -0
  83. package/dist/store/object-store.d.ts.map +1 -0
  84. package/dist/store/schema-version.d.ts +7 -0
  85. package/dist/store/schema-version.d.ts.map +1 -0
  86. package/dist/types/client.d.ts +209 -0
  87. package/dist/types/client.d.ts.map +1 -0
  88. package/dist/types/plugin.d.ts +112 -0
  89. package/dist/types/plugin.d.ts.map +1 -0
  90. package/dist/types/storage-object.d.ts +40 -85
  91. package/dist/types/storage-object.d.ts.map +1 -1
  92. package/package.json +50 -11
  93. package/prisma/dimah-s3.prisma +80 -0
  94. package/sql/mysql.sql +59 -0
  95. package/sql/pg.sql +53 -0
  96. package/sql/sqlite.sql +54 -0
  97. package/sql/upgrade/1.0.0-2.0.0/mysql.sql +71 -0
  98. package/sql/upgrade/1.0.0-2.0.0/pg.sql +47 -0
  99. package/sql/upgrade/1.0.0-2.0.0/sqlite.sql +119 -0
  100. package/dist/client/db-object-list-accessors.d.ts +0 -36
  101. package/dist/client/db-object-list-accessors.d.ts.map +0 -1
  102. package/dist/client/db-object-query.d.ts +0 -40
  103. package/dist/client/db-object-query.d.ts.map +0 -1
  104. package/dist/errors.d.ts +0 -6
  105. package/dist/errors.d.ts.map +0 -1
  106. package/dist/hooks/create-object-access-guard.d.ts +0 -51
  107. package/dist/hooks/create-object-access-guard.d.ts.map +0 -1
  108. package/dist/hooks/create-quota-guard.d.ts +0 -28
  109. package/dist/hooks/create-quota-guard.d.ts.map +0 -1
  110. package/dist/jobs/purge-stale-pending.d.ts +0 -31
  111. package/dist/jobs/purge-stale-pending.d.ts.map +0 -1
  112. package/dist/plugin/list-query-schema.d.ts +0 -21
  113. package/dist/plugin/list-query-schema.d.ts.map +0 -1
  114. package/dist/plugin/memoize-scope-resolver.d.ts +0 -8
  115. package/dist/plugin/memoize-scope-resolver.d.ts.map +0 -1
  116. package/dist/store/storage-object-store.d.ts +0 -137
  117. package/dist/store/storage-object-store.d.ts.map +0 -1
  118. package/src/schema/examples/README.md +0 -10
  119. package/src/schema/examples/drizzle.ts +0 -92
  120. package/src/schema/examples/schema.prisma +0 -55
@@ -0,0 +1,69 @@
1
+ import * as z from "zod";
2
+ /** Most rows one page of `GET /db/objects` returns. */
3
+ export declare const DB_LIST_MAX_LIMIT = 100;
4
+ /**
5
+ * Query of `GET /db/objects`. `folder` is a wire folder (`""` is the root)
6
+ * that the endpoint validates, so a bad path is `FOLDER_INVALID`. Blank
7
+ * `search`, `contentType`, and `cursor` values are omitted.
8
+ */
9
+ export declare const dbListQuerySchema: z.ZodObject<{
10
+ folder: z.ZodOptional<z.ZodString>;
11
+ route: z.ZodOptional<z.ZodString>;
12
+ status: z.ZodOptional<z.ZodEnum<{
13
+ active: "active";
14
+ deleted: "deleted";
15
+ pending: "pending";
16
+ }>>;
17
+ contentType: z.ZodPipe<z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>, z.ZodOptional<z.ZodString>>;
18
+ search: z.ZodPipe<z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>, z.ZodOptional<z.ZodString>>;
19
+ sort: z.ZodOptional<z.ZodCodec<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
20
+ field: z.ZodEnum<{
21
+ createdAt: "createdAt";
22
+ filename: "filename";
23
+ size: "size";
24
+ updatedAt: "updatedAt";
25
+ }>;
26
+ direction: z.ZodEnum<{
27
+ asc: "asc";
28
+ desc: "desc";
29
+ }>;
30
+ }, z.core.$strip>]>, z.ZodObject<{
31
+ field: z.ZodEnum<{
32
+ createdAt: "createdAt";
33
+ filename: "filename";
34
+ size: "size";
35
+ updatedAt: "updatedAt";
36
+ }>;
37
+ direction: z.ZodEnum<{
38
+ asc: "asc";
39
+ desc: "desc";
40
+ }>;
41
+ }, z.core.$strip>>>;
42
+ limit: z.ZodDefault<z.ZodCodec<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>, z.ZodInt>>;
43
+ cursor: z.ZodPipe<z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>, z.ZodOptional<z.ZodString>>;
44
+ }, z.core.$strict>;
45
+ /** Query of `GET /db/object`. */
46
+ export declare const dbObjectQuerySchema: z.ZodObject<{
47
+ key: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
48
+ bucket: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strict>;
50
+ /**
51
+ * Body of `PATCH /db/object`. `folder` is validated by the endpoint; `null`
52
+ * and `""` are the root. `attributes` are checked by the plugin's
53
+ * `attributes.schema`.
54
+ */
55
+ export declare const dbUpdateObjectBodySchema: z.ZodObject<{
56
+ key: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
57
+ bucket: z.ZodOptional<z.ZodString>;
58
+ filename: z.ZodOptional<z.ZodString>;
59
+ folder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ attributes: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
61
+ }, z.core.$strict>;
62
+ /**
63
+ * Body of `POST /db/folder` and query of `DELETE /db/folder`. The endpoint
64
+ * validates `path`, so a bad path is `FOLDER_INVALID`.
65
+ */
66
+ export declare const dbFolderInputSchema: z.ZodObject<{
67
+ path: z.ZodString;
68
+ }, z.core.$strict>;
69
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/plugin/schemas.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAuDrC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiB5B,CAAC;AAEH,iCAAiC;AACjC,eAAO,MAAM,mBAAmB;;;kBAG9B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;kBAOnC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;kBAE9B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { DimahS3Locals } from "@dimah-s3/server";
2
+ import type { DbPluginOptions, ScopeContext } from "../types/plugin.js";
3
+ /** The call a scope is resolved for: its request and the guards' `locals`. */
4
+ export type ScopeCall = {
5
+ request: Request;
6
+ locals: DimahS3Locals;
7
+ };
8
+ /** What a scope is resolved for: the operation and, when known, the route. */
9
+ export type ScopeTarget = Pick<ScopeContext, "operation" | "route">;
10
+ /** A {@link ScopeContext} whose scope is resolved. */
11
+ export type ResolvedScope<TSession = undefined> = ScopeContext<TSession> & {
12
+ scope: string;
13
+ };
14
+ /**
15
+ * Resolves the scope of a call.
16
+ * @throws `UNAUTHORIZED` when `resolveScope` returns `null`.
17
+ */
18
+ export type ScopeResolver<TSession = undefined> = (call: ScopeCall, target: ScopeTarget) => Promise<ResolvedScope<TSession>>;
19
+ export type CreateScopeResolverOptions<TSession> = Pick<DbPluginOptions<TSession>, "getSession" | "resolveScope">;
20
+ /**
21
+ * Wraps the plugin's `getSession` and `resolveScope`. `getSession` runs at
22
+ * most once per `Request`. `resolveScope` runs once per call, operation,
23
+ * and route. A call is its `locals` object: the server creates one per
24
+ * operation and hands it to every hook of that operation. So the guard and
25
+ * the lifecycle hooks of one call share a scope, and it sees the `locals`
26
+ * of the first hook that asked. Two `s3.api` calls never share one, even
27
+ * when they pass the same `Request`. Each key of a `deleteMany` gets its
28
+ * own `locals`, so its guard's `locals` reach the scope too.
29
+ */
30
+ export declare function createScopeResolver<TSession>(options: CreateScopeResolverOptions<TSession>): ScopeResolver<TSession>;
31
+ //# sourceMappingURL=scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/plugin/scope.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEpE,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC;AAEpE,sDAAsD;AACtD,MAAM,MAAM,aAAa,CAAC,QAAQ,GAAG,SAAS,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG;IACzE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,QAAQ,GAAG,SAAS,IAAI,CAChD,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,0BAA0B,CAAC,QAAQ,IAAI,IAAI,CACrD,eAAe,CAAC,QAAQ,CAAC,EACzB,YAAY,GAAG,cAAc,CAC9B,CAAC;AAgBF;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAC1C,OAAO,EAAE,0BAA0B,CAAC,QAAQ,CAAC,GAC5C,aAAa,CAAC,QAAQ,CAAC,CAmCzB"}
@@ -1,7 +1,11 @@
1
- import type { DbClientObject, StorageObject } from "../types/storage-object.js";
1
+ import type { DbClientFolder, DbClientObject } from "../types/client.js";
2
+ import type { StorageFolder, StorageObject } from "../types/storage-object.js";
2
3
  /**
3
- * Map a full store row to the browser wire contract for `GET /db/objects`.
4
- * Drops server-only fields (`scope`, `eTag`, `metadata`, `acl`, …).
4
+ * Maps a store row to the browser wire shape. Drops server-only fields
5
+ * (`scope`, `eTag`, `s3Metadata`, `acl`, upload state). `toClient` maps the
6
+ * stored attributes; without it the browser sees them as stored.
5
7
  */
6
- export declare function toDbClientObject(object: StorageObject): DbClientObject;
8
+ export declare function toDbClientObject<TAttributes, TClientAttributes = TAttributes>(object: StorageObject<TAttributes>, toClient?: (attributes: TAttributes) => TClientAttributes): DbClientObject<TClientAttributes>;
9
+ /** Maps a `storage_folder` row to the browser wire shape. */
10
+ export declare function toDbClientFolder(folder: StorageFolder): DbClientFolder;
7
11
  //# sourceMappingURL=to-db-client-object.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"to-db-client-object.d.ts","sourceRoot":"","sources":["../../src/plugin/to-db-client-object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5E;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,cAAc,CAatE"}
1
+ {"version":3,"file":"to-db-client-object.d.ts","sourceRoot":"","sources":["../../src/plugin/to-db-client-object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EAEf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE3E;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,GAAG,WAAW,EAC3E,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,EAClC,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,WAAW,KAAK,iBAAiB,GACxD,cAAc,CAAC,iBAAiB,CAAC,CAyBnC;AAED,6DAA6D;AAC7D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,cAAc,CAOtE"}
@@ -4,28 +4,21 @@ export declare const v1: import("fumadb/schema").Schema<"1.0.0", {
4
4
  scope: import("fumadb/schema").Column<"string", string, string>;
5
5
  bucket: import("fumadb/schema").Column<"string", string, string>;
6
6
  key: import("fumadb/schema").Column<"string", string, string>;
7
- /** Named dimah-s3 route that created the object. */
8
7
  route: import("fumadb/schema").Column<"string", string, string>;
9
8
  contentType: import("fumadb/schema").Column<"string", string | null, string | null>;
10
- /** Verified size from HeadObject after confirm. */
11
9
  size: import("fumadb/schema").Column<"bigint", bigint | null, bigint | null>;
12
10
  eTag: import("fumadb/schema").Column<"string", string | null, string | null>;
13
11
  filename: import("fumadb/schema").Column<"string", string | null, string | null>;
14
12
  status: import("fumadb/schema").Column<"string", string, string>;
15
- /** App-specific labels, visibility, publicUrl, etc. */
16
- metadata: import("fumadb/schema").Column<"json", unknown, unknown>;
13
+ s3Metadata: import("fumadb/schema").Column<"json", unknown, unknown>;
17
14
  acl: import("fumadb/schema").Column<"string", string | null, string | null>;
18
- /** Multipart upload ID while status = pending. */
19
15
  uploadId: import("fumadb/schema").Column<"string", string | null, string | null>;
20
- /** Client-declared size before confirm (quota reservation). */
21
16
  declaredSize: import("fumadb/schema").Column<"bigint", bigint | null, bigint | null>;
22
17
  confirmedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date | null>;
23
- /** Pending TTL or temporary object expiry. */
24
18
  expiresAt: import("fumadb/schema").Column<"timestamp", Date | null, Date | null>;
25
19
  createdAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
26
20
  updatedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
27
21
  deletedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date | null>;
28
22
  }, {}>;
29
23
  }>;
30
- export type { StorageObjectStatus } from "../types/storage-object.js";
31
24
  //# sourceMappingURL=v1.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/schema/v1.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,EAAE;;;;;;QAvBb,oDAAoD;;;QAGpD,mDAAmD;;;;;QAKnD,uDAAuD;;;QAGvD,kDAAkD;;QAElD,+DAA+D;;;QAG/D,8CAA8C;;;;;;EAY9C,CAAC;AAEH,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/schema/v1.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;EAKb,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { type Column } from "fumadb/schema";
2
+ /** A secondary index, by SQL table and column names. */
3
+ export type SchemaIndex = {
4
+ name: string;
5
+ table: "storage_object" | "storage_folder";
6
+ columns: readonly string[];
7
+ };
8
+ /**
9
+ * Secondary indexes of schema 2.0.0. FumaDB cannot declare them, so the SQL
10
+ * files, the Drizzle tables, and the Prisma schema carry them.
11
+ */
12
+ export declare const v2Indexes: readonly SchemaIndex[];
13
+ /**
14
+ * Schema 2.0.0: logical folders (`folder` plus `storage_folder`), S3 metadata
15
+ * split from typed `attributes`, the upload token, and the sort indexes.
16
+ */
17
+ export declare const v2: import("fumadb/schema").Schema<"2.0.0", {
18
+ storageObject: import("fumadb/schema").Table<{
19
+ id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
20
+ /** Owner, for example `user:123` or `org:acme`. */
21
+ scope: Column<"string", string, string>;
22
+ bucket: Column<"string", string, string>;
23
+ key: Column<"string", string, string>;
24
+ /** Named dimah-s3 route that created the object. */
25
+ route: Column<"string", string, string>;
26
+ /** Logical folder path. `null` is the root. */
27
+ folder: Column<"string", string | null, string | null>;
28
+ filename: Column<"string", string, string>;
29
+ contentType: Column<"string", string | null, string | null>;
30
+ /** Verified size from HeadObject, set on confirm. */
31
+ size: Column<"bigint", number | null, string | number | bigint | null>;
32
+ /** Size the client declared before confirm. Quota counts it while pending. */
33
+ declaredSize: Column<"bigint", number | null, string | number | bigint | null>;
34
+ eTag: Column<"string", string | null, string | null>;
35
+ status: Column<"string", string, string>;
36
+ /** S3 user metadata of the verified object. */
37
+ s3Metadata: Column<"json", unknown, unknown>;
38
+ /** App attributes, validated by the plugin's `attributes.schema`. */
39
+ attributes: Column<"json", unknown, unknown>;
40
+ acl: Column<"string", string | null, string | null>;
41
+ /** Multipart upload ID while the row is pending. */
42
+ uploadId: Column<"string", string | null, string | null>;
43
+ /** Token of the upload ticket that wrote the row. Confirm and purge match it. */
44
+ uploadToken: Column<"string", string | null, string | null>;
45
+ /** Confirm deadline of a pending row (the upload ticket's expiry). */
46
+ expiresAt: Column<"timestamp", Date | null, Date | null>;
47
+ confirmedAt: Column<"timestamp", Date | null, Date | null>;
48
+ createdAt: Column<"timestamp", Date | null, Date>;
49
+ updatedAt: Column<"timestamp", Date | null, Date>;
50
+ deletedAt: Column<"timestamp", Date | null, Date | null>;
51
+ }, {}>;
52
+ storageFolder: import("fumadb/schema").Table<{
53
+ id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
54
+ scope: Column<"string", string, string>;
55
+ /** Full folder path. */
56
+ path: Column<"string", string, string>;
57
+ /** Path of the containing folder. `null` is the root. */
58
+ parent: Column<"string", string | null, string | null>;
59
+ /** Last segment of `path`. */
60
+ name: Column<"string", string, string>;
61
+ createdAt: Column<"timestamp", Date | null, Date>;
62
+ }, {}>;
63
+ }>;
64
+ //# sourceMappingURL=v2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/schema/v2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAuE7E,wDAAwD;AACxD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,SAAS,WAAW,EA+B3C,CAAC;AAyCF;;;GAGG;AACH,eAAO,MAAM,EAAE;;;QArIb,mDAAmD;;;;QAInD,oDAAoD;;QAEpD,+CAA+C;;;;QAI/C,qDAAqD;;QAErD,8EAA8E;;;;QAI9E,+CAA+C;;QAE/C,qEAAqE;;;QAGrE,oDAAoD;;QAEpD,iFAAiF;;QAEjF,sEAAsE;;;;;;;;;;QAYtE,wBAAwB;;QAExB,yDAAyD;;QAEzD,8BAA8B;;;;EAqG9B,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * The Standard Schema v1 interface (https://standardschema.dev). Zod,
3
+ * Valibot, ArkType, and other validators implement it, so `attributes.schema`
4
+ * accepts any of them without a dependency on one.
5
+ */
6
+ export interface StandardSchemaV1<Input = unknown, Output = Input> {
7
+ readonly "~standard": StandardSchemaProps<Input, Output>;
8
+ }
9
+ /** The `~standard` property of a {@link StandardSchemaV1}. */
10
+ export interface StandardSchemaProps<Input = unknown, Output = Input> {
11
+ readonly version: 1;
12
+ readonly vendor: string;
13
+ readonly validate: (value: unknown) => StandardSchemaResult<Output> | Promise<StandardSchemaResult<Output>>;
14
+ readonly types?: StandardSchemaTypes<Input, Output> | undefined;
15
+ }
16
+ export type StandardSchemaResult<Output> = StandardSchemaSuccess<Output> | StandardSchemaFailure;
17
+ export interface StandardSchemaSuccess<Output> {
18
+ readonly value: Output;
19
+ readonly issues?: undefined;
20
+ }
21
+ export interface StandardSchemaFailure {
22
+ readonly issues: readonly StandardSchemaIssue[];
23
+ }
24
+ export interface StandardSchemaIssue {
25
+ readonly message: string;
26
+ readonly path?: readonly (PropertyKey | StandardSchemaPathSegment)[] | undefined;
27
+ }
28
+ export interface StandardSchemaPathSegment {
29
+ readonly key: PropertyKey;
30
+ }
31
+ export interface StandardSchemaTypes<Input = unknown, Output = Input> {
32
+ readonly input: Input;
33
+ readonly output: Output;
34
+ }
35
+ /** Runs `schema` on `value`, whether the validator is sync or async. */
36
+ export declare function validateStandardSchema<Output>(schema: StandardSchemaV1<unknown, Output>, value: unknown): Promise<StandardSchemaResult<Output>>;
37
+ /**
38
+ * One line for the first issue, prefixed with its dotted path when it has
39
+ * one (`title: Required`). Fits the `VALIDATION_ERROR` `issue` param.
40
+ */
41
+ export declare function formatStandardIssue(issues: readonly StandardSchemaIssue[]): string;
42
+ //# sourceMappingURL=standard-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standard-schema.d.ts","sourceRoot":"","sources":["../src/standard-schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,gBAAgB,CAAC,KAAK,GAAG,OAAO,EAAE,MAAM,GAAG,KAAK;IAC/D,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAC1D;AAED,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB,CAAC,KAAK,GAAG,OAAO,EAAE,MAAM,GAAG,KAAK;IAClE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,CACjB,KAAK,EAAE,OAAO,KACX,oBAAoB,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1E,QAAQ,CAAC,KAAK,CAAC,EAAE,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;CACjE;AAED,MAAM,MAAM,oBAAoB,CAAC,MAAM,IACrC,qBAAqB,CAAC,MAAM,CAAC,GAAG,qBAAqB,CAAC;AAExD,MAAM,WAAW,qBAAqB,CAAC,MAAM;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EACZ,SAAS,CAAC,WAAW,GAAG,yBAAyB,CAAC,EAAE,GAAG,SAAS,CAAC;CACpE;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB,CAAC,KAAK,GAAG,OAAO,EAAE,MAAM,GAAG,KAAK;IAClE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,wEAAwE;AACxE,wBAAsB,sBAAsB,CAAC,MAAM,EACjD,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,EACzC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAEvC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,mBAAmB,EAAE,GACrC,MAAM,CASR"}
@@ -0,0 +1,17 @@
1
+ import { type DimahS3DbClient } from "../fuma-db.js";
2
+ import { type StorageFolderStore } from "./folder-store";
3
+ import { type StorageObjectStore } from "./object-store";
4
+ /** The stores over one FumaDB client. */
5
+ export type DbStore<TAttributes = never> = {
6
+ objects: StorageObjectStore<TAttributes>;
7
+ folders: StorageFolderStore;
8
+ /** Throws unless the database is at the schema the stores use. */
9
+ checkSchema: () => Promise<void>;
10
+ };
11
+ /**
12
+ * Creates the object and folder stores. The first query checks the schema
13
+ * version, so a 1.x database throws instead of being read with the wrong
14
+ * columns. A failed check runs again on the next query.
15
+ */
16
+ export declare function createDbStore<TAttributes = never>(client: DimahS3DbClient): DbStore<TAttributes>;
17
+ //# sourceMappingURL=create-db-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-db-store.d.ts","sourceRoot":"","sources":["../../src/store/create-db-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAG5E,yCAAyC;AACzC,MAAM,MAAM,OAAO,CAAC,WAAW,GAAG,KAAK,IAAI;IACzC,OAAO,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,kEAAkE;IAClE,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,GAAG,KAAK,EAC/C,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,WAAW,CAAC,CAkBtB"}
@@ -0,0 +1,36 @@
1
+ import type { StorageFolder } from "../types/storage-object.js";
2
+ import { type GetDbOrm } from "./object-store";
3
+ /** Most child folders `children` returns when `limit` is not given. */
4
+ export declare const DEFAULT_FOLDER_CHILDREN_LIMIT = 1000;
5
+ /**
6
+ * Data access for the `storage_folder` table. Paths are normalized folder
7
+ * paths (see `parseFolder`); the root (`null`) is never stored.
8
+ */
9
+ export type StorageFolderStore = {
10
+ /** Loads one folder. */
11
+ find: (scope: string, path: string) => Promise<StorageFolder | null>;
12
+ /** Direct child folders of `parent` (`null` is the root), by name. */
13
+ children: (scope: string, parent: string | null, options?: {
14
+ limit?: number;
15
+ }) => Promise<StorageFolder[]>;
16
+ /**
17
+ * Creates `path` and every missing ancestor, so it also restores an
18
+ * ancestor that a concurrent delete removed. Safe to call concurrently.
19
+ * The root (`null`) needs nothing.
20
+ */
21
+ ensure: (scope: string, path: string | null) => Promise<void>;
22
+ /**
23
+ * Creates `path` and every missing ancestor.
24
+ * @throws `FOLDER_EXISTS` when the folder already exists.
25
+ */
26
+ create: (scope: string, path: string) => Promise<StorageFolder>;
27
+ /**
28
+ * Removes an empty folder. Removing a missing folder does nothing.
29
+ * @throws `FOLDER_NOT_EMPTY` when it has child folders, or active or
30
+ * pending objects.
31
+ */
32
+ delete: (scope: string, path: string) => Promise<void>;
33
+ };
34
+ /** Creates the `storage_folder` store over `getOrm`. */
35
+ export declare function createFolderStore(getOrm: GetDbOrm): StorageFolderStore;
36
+ //# sourceMappingURL=folder-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"folder-store.d.ts","sourceRoot":"","sources":["../../src/store/folder-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEvE,uEAAuE;AACvE,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,wBAAwB;IACxB,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACrE,sEAAsE;IACtE,QAAQ,EAAE,CACR,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,KACzB,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IAC9B;;;;OAIG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D;;;OAGG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IAChE;;;;OAIG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACxD,CAAC;AAYF,wDAAwD;AACxD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,QAAQ,GAAG,kBAAkB,CAoHtE"}
@@ -1,6 +1,28 @@
1
- export declare function encodeListCursor(createdAt: Date, id: string): string;
2
- export declare function decodeListCursor(cursor: string): {
3
- createdAt: Date;
1
+ import type { DbListSort } from "../types/client.js";
2
+ import type { StorageObject, StorageObjectStatus } from "../types/storage-object.js";
3
+ /** Listing order when none is given: newest first. */
4
+ export declare const DEFAULT_LIST_SORT: DbListSort;
5
+ /** What a listing is filtered and ordered by. A cursor is only valid for these. */
6
+ export type ListCursorFilters = {
7
+ /** `undefined` lists every folder; `null` is the root. */
8
+ folder: string | null | undefined;
9
+ search: string | undefined;
10
+ status: StorageObjectStatus;
11
+ route: string | undefined;
12
+ contentType: string | undefined;
13
+ sort: DbListSort;
14
+ };
15
+ /** Position after one row: its sort value (`null` when it has none) and `id`. */
16
+ export type ListCursor = {
17
+ value: Date | number | string | null;
4
18
  id: string;
5
- } | null;
19
+ };
20
+ /** Encodes the position after `object` in a listing under `filters`. */
21
+ export declare function encodeListCursor(filters: ListCursorFilters, object: StorageObject<unknown>): string;
22
+ /**
23
+ * Decodes a cursor for a listing under `filters`. Returns `null` when the
24
+ * cursor is malformed or was made under other filters, so the listing
25
+ * starts again at the first row.
26
+ */
27
+ export declare function decodeListCursor(cursor: string, filters: ListCursorFilters): ListCursor | null;
6
28
  //# sourceMappingURL=list-cursor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-cursor.d.ts","sourceRoot":"","sources":["../../src/store/list-cursor.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAIpE;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,GACb;IAAE,SAAS,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAYxC"}
1
+ {"version":3,"file":"list-cursor.d.ts","sourceRoot":"","sources":["../../src/store/list-cursor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAEhC,sDAAsD;AACtD,eAAO,MAAM,iBAAiB,EAAE,UAG/B,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0DAA0D;IAC1D,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACrC,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAqCF,wEAAwE;AACxE,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,GAC7B,MAAM,CAQR;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,GACzB,UAAU,GAAG,IAAI,CAYnB"}
@@ -1,26 +1,35 @@
1
1
  import type { StorageObject } from "../types/storage-object.js";
2
- /** Raw `storage_object` row as returned by the FumaDB ORM. */
2
+ /**
3
+ * A byte count as a driver returns it: a number, a bigint, or a string
4
+ * (PostgreSQL int8). A 1.x SQLite row still holds a blob, read as a bigint.
5
+ */
6
+ type ByteCount = number | bigint | string | null;
7
+ /** Raw `storage_object` row as the FumaDB ORM returns it. */
3
8
  export type StorageObjectRow = {
4
9
  id: string;
5
10
  scope: string;
6
11
  bucket: string;
7
12
  key: string;
8
13
  route: string;
14
+ folder: string | null;
15
+ filename: string;
9
16
  contentType: string | null;
10
- size: bigint | null;
17
+ size: ByteCount;
18
+ declaredSize: ByteCount;
11
19
  eTag: string | null;
12
- filename: string | null;
13
20
  status: string;
14
- metadata: unknown;
21
+ s3Metadata: unknown;
22
+ attributes: unknown;
15
23
  acl: string | null;
16
24
  uploadId: string | null;
17
- declaredSize: bigint | null;
18
- confirmedAt: Date | null;
25
+ uploadToken: string | null;
19
26
  expiresAt: Date | null;
27
+ confirmedAt: Date | null;
20
28
  createdAt: Date;
21
29
  updatedAt: Date;
22
30
  deletedAt: Date | null;
23
31
  };
24
- /** Normalize a raw row: bigint → number, status narrowing, metadata cast. */
25
- export declare function mapStorageObjectRow(row: StorageObjectRow): StorageObject;
32
+ /** Normalizes a raw row: sizes become numbers, JSON columns are cast. */
33
+ export declare function mapStorageObjectRow<TAttributes = never>(row: StorageObjectRow): StorageObject<TAttributes>;
34
+ export {};
26
35
  //# sourceMappingURL=map-row.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"map-row.d.ts","sourceRoot":"","sources":["../../src/store/map-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAEhC,8DAA8D;AAC9D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB,CAAC;AAOF,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,GAAG,aAAa,CAsBxE"}
1
+ {"version":3,"file":"map-row.d.ts","sourceRoot":"","sources":["../../src/store/map-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAEjD,6DAA6D;AAC7D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,SAAS,CAAC;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB,CAAC;AAMF,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,WAAW,GAAG,KAAK,EACrD,GAAG,EAAE,gBAAgB,GACpB,aAAa,CAAC,WAAW,CAAC,CAyB5B"}