@dimah-s3/db 2.0.0-beta.1 → 2.0.0-beta.11

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 (85) hide show
  1. package/README.md +19 -10
  2. package/dist/adapters/drizzle.d.ts +2 -3
  3. package/dist/adapters/drizzle.d.ts.map +1 -1
  4. package/dist/adapters/kysely.d.ts +1 -1
  5. package/dist/adapters/prisma.d.ts +1 -1
  6. package/dist/cli.d.ts +18 -13
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +57 -84
  9. package/dist/cli.js.map +1 -1
  10. package/dist/client/db-client.d.ts +1 -1
  11. package/dist/client/db-client.d.ts.map +1 -1
  12. package/dist/client/db-object-source.d.ts +15 -9
  13. package/dist/client/db-object-source.d.ts.map +1 -1
  14. package/dist/client/index.d.ts +3 -3
  15. package/dist/client/index.d.ts.map +1 -1
  16. package/dist/client/index.js +101 -21
  17. package/dist/client/index.js.map +1 -1
  18. package/dist/folder-path.d.ts +17 -4
  19. package/dist/folder-path.d.ts.map +1 -1
  20. package/dist/fuma-db.d.ts +23 -23
  21. package/dist/fuma-db.d.ts.map +1 -1
  22. package/dist/index.d.ts +10 -9
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +843 -268
  25. package/dist/index.js.map +1 -1
  26. package/dist/plugin/create-database-endpoints.d.ts +46 -22
  27. package/dist/plugin/create-database-endpoints.d.ts.map +1 -1
  28. package/dist/plugin/create-database-lifecycle-hooks.d.ts +4 -4
  29. package/dist/plugin/create-database-lifecycle-hooks.d.ts.map +1 -1
  30. package/dist/plugin/db.d.ts +10 -2
  31. package/dist/plugin/db.d.ts.map +1 -1
  32. package/dist/plugin/object-access.d.ts +2 -2
  33. package/dist/plugin/object-access.d.ts.map +1 -1
  34. package/dist/plugin/public-stores.d.ts +5 -8
  35. package/dist/plugin/public-stores.d.ts.map +1 -1
  36. package/dist/plugin/quota.d.ts +1 -1
  37. package/dist/plugin/record.d.ts +58 -0
  38. package/dist/plugin/record.d.ts.map +1 -0
  39. package/dist/plugin/schemas.d.ts +25 -11
  40. package/dist/plugin/schemas.d.ts.map +1 -1
  41. package/dist/plugin/scope.d.ts +2 -0
  42. package/dist/plugin/scope.d.ts.map +1 -1
  43. package/dist/plugin/to-db-client-object.d.ts.map +1 -1
  44. package/dist/schema/schema.d.ts +48 -49
  45. package/dist/schema/schema.d.ts.map +1 -1
  46. package/dist/store/create-db-store.d.ts +2 -2
  47. package/dist/store/create-db-store.d.ts.map +1 -1
  48. package/dist/store/folder-store.d.ts +73 -15
  49. package/dist/store/folder-store.d.ts.map +1 -1
  50. package/dist/store/list-cursor.d.ts +3 -1
  51. package/dist/store/list-cursor.d.ts.map +1 -1
  52. package/dist/store/map-row.d.ts +3 -9
  53. package/dist/store/map-row.d.ts.map +1 -1
  54. package/dist/store/object-store.d.ts +42 -10
  55. package/dist/store/object-store.d.ts.map +1 -1
  56. package/dist/store/search-name.d.ts +7 -0
  57. package/dist/store/search-name.d.ts.map +1 -0
  58. package/dist/types/client.d.ts +114 -23
  59. package/dist/types/client.d.ts.map +1 -1
  60. package/dist/types/plugin.d.ts +19 -7
  61. package/dist/types/plugin.d.ts.map +1 -1
  62. package/dist/types/storage-object.d.ts +8 -7
  63. package/dist/types/storage-object.d.ts.map +1 -1
  64. package/package.json +15 -33
  65. package/dist/drizzle/mysql.d.ts +0 -1025
  66. package/dist/drizzle/mysql.d.ts.map +0 -1
  67. package/dist/drizzle/mysql.js +0 -117
  68. package/dist/drizzle/mysql.js.map +0 -1
  69. package/dist/drizzle/pg.d.ts +0 -964
  70. package/dist/drizzle/pg.d.ts.map +0 -1
  71. package/dist/drizzle/pg.js +0 -98
  72. package/dist/drizzle/pg.js.map +0 -1
  73. package/dist/drizzle/shared.d.ts +0 -7
  74. package/dist/drizzle/shared.d.ts.map +0 -1
  75. package/dist/drizzle/sqlite.d.ts +0 -1024
  76. package/dist/drizzle/sqlite.d.ts.map +0 -1
  77. package/dist/drizzle/sqlite.js +0 -101
  78. package/dist/drizzle/sqlite.js.map +0 -1
  79. package/prisma/dimah-s3.prisma +0 -80
  80. package/sql/mysql.sql +0 -59
  81. package/sql/pg.sql +0 -53
  82. package/sql/sqlite.sql +0 -54
  83. package/src/drizzle/mysql.ts +0 -172
  84. package/src/drizzle/pg.ts +0 -140
  85. package/src/drizzle/sqlite.ts +0 -144
@@ -1,8 +1,8 @@
1
1
  import type { DimahS3Locals } from "@dimah-s3/server";
2
2
  import type { DimahS3DbClient } from "../fuma-db.js";
3
3
  import type { StandardSchemaV1 } from "../standard-schema.js";
4
- import type { DbQuota } from "./client";
5
- import type { StorageObject } from "./storage-object";
4
+ import type { DbQuota } from "./client.js";
5
+ import type { StorageObject } from "./storage-object.js";
6
6
  /**
7
7
  * What a scope is resolved for.
8
8
  * - `upload`: presign, multipart init, and `s3.put`
@@ -13,8 +13,9 @@ import type { StorageObject } from "./storage-object";
13
13
  * - `list`: `GET /db/objects`
14
14
  * - `read`: `GET /db/object`
15
15
  * - `update`: `PATCH /db/object` and the folder endpoints
16
+ * - `record`: `s3.db.record`, an object the app already put in the bucket
16
17
  */
17
- export type ScopeOperation = "upload" | "confirm" | "multipart" | "download" | "delete" | "list" | "read" | "update";
18
+ export type ScopeOperation = "upload" | "confirm" | "multipart" | "download" | "delete" | "list" | "read" | "update" | "record";
18
19
  /**
19
20
  * Who is calling: what `resolveScope` and a `quota` function see. The
20
21
  * scope comes from the caller alone, never from the target, so the same
@@ -41,8 +42,18 @@ export type AuthorizeContext<TSession = undefined, TAttributes = never> = ScopeC
41
42
  scope: string;
42
43
  /** Object key. Absent on `list` and the folder endpoints. */
43
44
  key?: string;
44
- /** Target folder of an upload, move, or folder endpoint. `null` is the root. */
45
+ /**
46
+ * Path of the target folder. `null` is the root. Absent when the call is
47
+ * not aimed at one folder. A rename or move reports the destination.
48
+ */
45
49
  folder?: string | null;
50
+ /** Id of the target folder. `null` is the root. */
51
+ folderId?: string | null;
52
+ /**
53
+ * `true` when a `list` also covers every folder below `folder`, as a
54
+ * search across folders does. Deny it to keep listings to one folder.
55
+ */
56
+ recursive?: boolean;
46
57
  /** Client extras of the upload. Set on `upload` only. */
47
58
  clientMetadata?: Record<string, string>;
48
59
  /**
@@ -89,9 +100,10 @@ export type DbPluginOptions<TSession = undefined, TAttributes = never, TClientAt
89
100
  /** Loads the session for a request. Called at most once per `Request`. */
90
101
  getSession?: (request: Request) => TSession | Promise<TSession>;
91
102
  /**
92
- * Owning scope of the caller, such as `user:123`. `null` rejects the
93
- * call with `UNAUTHORIZED`. It runs once per call and route, so the guard
94
- * and the lifecycle hooks of one call share the result.
103
+ * Owning scope of the caller, such as `user:123`, at most 255 characters.
104
+ * `null` rejects the call with `UNAUTHORIZED`, and a longer scope fails it
105
+ * as a config error. It runs once per call and route, so the guard and the
106
+ * lifecycle hooks of one call share the result.
95
107
  */
96
108
  resolveScope: (context: ScopeContext<TSession>) => string | null | Promise<string | null>;
97
109
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,SAAS,GACT,WAAW,GACX,UAAU,GACV,QAAQ,GACR,MAAM,GACN,MAAM,GACN,QAAQ,CAAC;AAEb;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,QAAQ,GAAG,SAAS,IAAI;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,yCAAyC;IACz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EAAkE;IAClE,KAAK,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChC,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,kDAAkD;IAClD,UAAU,CAAC,EAAE,mBAAmB,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;CAClE,CAAC"}
@@ -18,8 +18,8 @@ export type StorageObject<TAttributes = never> = {
18
18
  key: string;
19
19
  /** Named dimah-s3 route that created the object. */
20
20
  route: string;
21
- /** Logical folder path. `null` is the root. */
22
- folder: string | null;
21
+ /** Folder that holds the object. `null` is the root. */
22
+ folderId: string | null;
23
23
  filename: string;
24
24
  contentType: string | null;
25
25
  /** Verified size in bytes, set on confirm. */
@@ -47,16 +47,17 @@ export type StorageObject<TAttributes = never> = {
47
47
  updatedAt: Date;
48
48
  deletedAt: Date | null;
49
49
  };
50
- /** A `storage_folder` row. A folder exists once per scope and path. */
50
+ /** A `storage_folder` row. A folder exists once per scope and id. */
51
51
  export type StorageFolder = {
52
52
  id: string;
53
53
  scope: string;
54
- /** Full folder path. */
55
- path: string;
56
- /** Path of the containing folder. `null` is the root. */
57
- parent: string | null;
54
+ /** Containing folder. `null` is the root. */
55
+ parentId: string | null;
58
56
  /** Last segment of `path`. */
59
57
  name: string;
58
+ /** Full folder path, kept in step with `name` and the parents. */
59
+ path: string;
60
60
  createdAt: Date;
61
+ updatedAt: Date;
61
62
  };
62
63
  //# sourceMappingURL=storage-object.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage-object.d.ts","sourceRoot":"","sources":["../../src/types/storage-object.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAE/E;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,WAAW,GAAG,KAAK,IAAI;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IAC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AC;IAChB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,qEAAqE;AACrE,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimah-s3/db",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.11",
4
4
  "description": "Optional database plugin for dimah-s3 — track S3 object ownership, listings, and resumable uploads",
5
5
  "keywords": [
6
6
  "s3",
@@ -18,7 +18,7 @@
18
18
  "fumadb",
19
19
  "typescript"
20
20
  ],
21
- "homepage": "https://v2.s3.dimah.dev/docs/db",
21
+ "homepage": "https://s3.dimah.dev/docs/db",
22
22
  "bugs": {
23
23
  "url": "https://github.com/dimah-kz/dimah-s3/issues"
24
24
  },
@@ -44,18 +44,6 @@
44
44
  "types": "./dist/cli.d.ts",
45
45
  "default": "./dist/cli.js"
46
46
  },
47
- "./drizzle/sqlite": {
48
- "types": "./dist/drizzle/sqlite.d.ts",
49
- "default": "./dist/drizzle/sqlite.js"
50
- },
51
- "./drizzle/pg": {
52
- "types": "./dist/drizzle/pg.d.ts",
53
- "default": "./dist/drizzle/pg.js"
54
- },
55
- "./drizzle/mysql": {
56
- "types": "./dist/drizzle/mysql.d.ts",
57
- "default": "./dist/drizzle/mysql.js"
58
- },
59
47
  "./adapters/drizzle": {
60
48
  "types": "./dist/adapters/drizzle.d.ts",
61
49
  "default": "./dist/adapters/drizzle.js"
@@ -70,24 +58,18 @@
70
58
  }
71
59
  },
72
60
  "files": [
73
- "dist",
74
- "sql",
75
- "prisma",
76
- "src/drizzle/sqlite.ts",
77
- "src/drizzle/pg.ts",
78
- "src/drizzle/mysql.ts"
61
+ "dist"
79
62
  ],
80
63
  "dependencies": {
81
- "@dimah-s3/core": "2.0.0-beta.1",
82
- "@paralleldrive/cuid2": "^3.3.0",
83
- "fumadb": "~0.6.0",
64
+ "@dimah-s3/core": "2.0.0-beta.11",
65
+ "fumadb": "~0.7.3",
84
66
  "zod": "^4.6.7"
85
67
  },
86
68
  "devDependencies": {
87
- "@aws-sdk/client-s3": "^3.1161.0",
88
- "@dimah-s3/react": "2.0.0-beta.1",
89
- "@dimah-s3/server": "2.0.0-beta.1",
90
- "@electric-sql/pglite": "^0.5.14",
69
+ "@aws-sdk/client-s3": "^3.1172.0",
70
+ "@dimah-s3/react": "2.0.0-beta.11",
71
+ "@dimah-s3/server": "2.0.0-beta.11",
72
+ "@electric-sql/pglite": "^0.5.16",
91
73
  "@types/better-sqlite3": "^9.6.0",
92
74
  "@types/node": "^26.6.6",
93
75
  "@types/react": "^19.3.0",
@@ -95,18 +77,18 @@
95
77
  "@workspace/tsup-config": "0.0.0",
96
78
  "@workspace/typescript-config": "0.0.1",
97
79
  "@workspace/vitest-config": "0.0.7",
98
- "better-sqlite3": "^13.0.3",
80
+ "better-sqlite3": "^13.2.0",
99
81
  "drizzle-orm": "1.0.0-rc.5",
100
- "eslint": "^10.14.0",
101
- "kysely": "^0.29.8",
82
+ "eslint": "^10.15.0",
83
+ "kysely": "^0.29.9",
102
84
  "tsc-alias": "^1.9.10",
103
85
  "tsup": "^9.0.0",
104
86
  "typescript": "7.0.2",
105
- "vitest": "^5.0.5"
87
+ "vitest": "^5.1.1"
106
88
  },
107
89
  "peerDependencies": {
108
90
  "@aws-sdk/client-s3": ">=3",
109
- "@dimah-s3/server": "2.0.0-beta.1",
91
+ "@dimah-s3/server": "2.0.0-beta.11",
110
92
  "@prisma/client": "^6.0.0 || ^7.0.0",
111
93
  "drizzle-orm": ">=1.0.0-rc.5 <2.0.0",
112
94
  "kysely": "^0.29.5"
@@ -129,7 +111,7 @@
129
111
  "access": "public"
130
112
  },
131
113
  "scripts": {
132
- "build": "tsup --config tsup.config.ts && tsc --emitDeclarationOnly -p tsconfig.build.json && tsc-alias",
114
+ "build": "tsup --config tsup.config.ts && tsc --emitDeclarationOnly -p tsconfig.build.json && tsc-alias && node ../../tooling/tsup-config/dts-extensions.mjs",
133
115
  "check-types": "tsc --noEmit",
134
116
  "lint": "eslint --cache --cache-strategy content --max-warnings 0",
135
117
  "test": "vitest run"