@encore.dev/sdk 2.0.0-beta.15 → 2.0.0-beta.17

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 (235) hide show
  1. package/README.md +111 -101
  2. package/app_meta.ts +56 -54
  3. package/config/config.ts +60 -57
  4. package/config/secrets.ts +45 -52
  5. package/config/value.ts +23 -26
  6. package/cron/mod.ts +28 -29
  7. package/dist/app_meta.d.ts +52 -50
  8. package/dist/app_meta.d.ts.map +1 -1
  9. package/dist/app_meta.js +2 -2
  10. package/dist/app_meta.js.map +1 -1
  11. package/dist/config/config.d.ts +58 -55
  12. package/dist/config/config.d.ts.map +1 -1
  13. package/dist/config/config.js +8 -9
  14. package/dist/config/config.js.map +1 -1
  15. package/dist/config/secrets.d.ts +45 -52
  16. package/dist/config/secrets.d.ts.map +1 -1
  17. package/dist/config/secrets.js +8 -9
  18. package/dist/config/secrets.js.map +1 -1
  19. package/dist/config/value.d.ts +20 -23
  20. package/dist/config/value.d.ts.map +1 -1
  21. package/dist/config/value.js +20 -23
  22. package/dist/config/value.js.map +1 -1
  23. package/dist/cron/mod.d.ts +26 -27
  24. package/dist/cron/mod.d.ts.map +1 -1
  25. package/dist/cron/mod.js +13 -14
  26. package/dist/cron/mod.js.map +1 -1
  27. package/dist/frontends/mod.d.ts +20 -19
  28. package/dist/frontends/mod.d.ts.map +1 -1
  29. package/dist/frontends/mod.js +20 -19
  30. package/dist/frontends/mod.js.map +1 -1
  31. package/dist/gateway/errors.d.ts +28 -30
  32. package/dist/gateway/errors.d.ts.map +1 -1
  33. package/dist/gateway/errors.js +29 -31
  34. package/dist/gateway/errors.js.map +1 -1
  35. package/dist/gateway/match.d.ts +54 -54
  36. package/dist/gateway/match.d.ts.map +1 -1
  37. package/dist/gateway/match.js +56 -56
  38. package/dist/gateway/match.js.map +1 -1
  39. package/dist/gateway/middleware.d.ts +62 -64
  40. package/dist/gateway/middleware.d.ts.map +1 -1
  41. package/dist/gateway/middleware.js +1 -1
  42. package/dist/gateway/middleware.js.map +1 -1
  43. package/dist/gateway/mod.d.ts +64 -67
  44. package/dist/gateway/mod.d.ts.map +1 -1
  45. package/dist/gateway/mod.js +72 -76
  46. package/dist/gateway/mod.js.map +1 -1
  47. package/dist/gateway/request.d.ts +138 -134
  48. package/dist/gateway/request.d.ts.map +1 -1
  49. package/dist/gateway/request.js +117 -108
  50. package/dist/gateway/request.js.map +1 -1
  51. package/dist/gateway/serve.d.ts +29 -34
  52. package/dist/gateway/serve.d.ts.map +1 -1
  53. package/dist/gateway/serve.js +51 -56
  54. package/dist/gateway/serve.js.map +1 -1
  55. package/dist/gateways/mod.d.ts +23 -21
  56. package/dist/gateways/mod.d.ts.map +1 -1
  57. package/dist/gateways/mod.js +25 -23
  58. package/dist/gateways/mod.js.map +1 -1
  59. package/dist/internal/runtime/napi/napi.cjs +1 -1
  60. package/dist/internal/runtime/napi/napi.d.cts +10 -3
  61. package/dist/internal/runtime/shutdown.d.ts +75 -57
  62. package/dist/internal/runtime/shutdown.d.ts.map +1 -1
  63. package/dist/internal/runtime/shutdown.js +88 -84
  64. package/dist/internal/runtime/shutdown.js.map +1 -1
  65. package/dist/log/logger.d.ts +43 -37
  66. package/dist/log/logger.d.ts.map +1 -1
  67. package/dist/log/logger.js +26 -25
  68. package/dist/log/logger.js.map +1 -1
  69. package/dist/metrics/mod.d.ts +133 -114
  70. package/dist/metrics/mod.d.ts.map +1 -1
  71. package/dist/metrics/mod.js +109 -101
  72. package/dist/metrics/mod.js.map +1 -1
  73. package/dist/otel.d.ts +6 -3
  74. package/dist/otel.d.ts.map +1 -1
  75. package/dist/otel.js +6 -3
  76. package/dist/otel.js.map +1 -1
  77. package/dist/pubsub/subscription.d.ts +88 -116
  78. package/dist/pubsub/subscription.d.ts.map +1 -1
  79. package/dist/pubsub/subscription.js +14 -17
  80. package/dist/pubsub/subscription.js.map +1 -1
  81. package/dist/pubsub/topic.d.ts +86 -113
  82. package/dist/pubsub/topic.d.ts.map +1 -1
  83. package/dist/pubsub/topic.js +68 -82
  84. package/dist/pubsub/topic.js.map +1 -1
  85. package/dist/reqctx/mod.d.ts +83 -86
  86. package/dist/reqctx/mod.d.ts.map +1 -1
  87. package/dist/reqctx/mod.js +39 -41
  88. package/dist/reqctx/mod.js.map +1 -1
  89. package/dist/services/index.d.ts +76 -75
  90. package/dist/services/index.d.ts.map +1 -1
  91. package/dist/services/index.js +73 -71
  92. package/dist/services/index.js.map +1 -1
  93. package/dist/shutdown/mod.d.ts +26 -25
  94. package/dist/shutdown/mod.d.ts.map +1 -1
  95. package/dist/shutdown/mod.js +26 -25
  96. package/dist/shutdown/mod.js.map +1 -1
  97. package/dist/storage/clickhouse/database.d.ts +113 -115
  98. package/dist/storage/clickhouse/database.d.ts.map +1 -1
  99. package/dist/storage/clickhouse/database.js +65 -79
  100. package/dist/storage/clickhouse/database.js.map +1 -1
  101. package/dist/storage/clickhouse/errors.d.ts +25 -26
  102. package/dist/storage/clickhouse/errors.d.ts.map +1 -1
  103. package/dist/storage/clickhouse/errors.js +15 -17
  104. package/dist/storage/clickhouse/errors.js.map +1 -1
  105. package/dist/storage/clickhouse/mod.d.ts +10 -10
  106. package/dist/storage/clickhouse/mod.js +10 -10
  107. package/dist/storage/objects/bucket.d.ts +196 -225
  108. package/dist/storage/objects/bucket.d.ts.map +1 -1
  109. package/dist/storage/objects/bucket.js +71 -84
  110. package/dist/storage/objects/bucket.js.map +1 -1
  111. package/dist/storage/objects/error.d.ts +4 -4
  112. package/dist/storage/objects/error.js +4 -4
  113. package/dist/storage/postgres/database.d.ts +124 -149
  114. package/dist/storage/postgres/database.d.ts.map +1 -1
  115. package/dist/storage/postgres/database.js +98 -135
  116. package/dist/storage/postgres/database.js.map +1 -1
  117. package/dist/storage/postgres/errors.d.ts +42 -48
  118. package/dist/storage/postgres/errors.d.ts.map +1 -1
  119. package/dist/storage/postgres/errors.js +44 -51
  120. package/dist/storage/postgres/errors.js.map +1 -1
  121. package/dist/storage/postgres/interval.d.ts +19 -19
  122. package/dist/storage/postgres/interval.d.ts.map +1 -1
  123. package/dist/storage/postgres/interval.js +21 -21
  124. package/dist/storage/postgres/interval.js.map +1 -1
  125. package/dist/storage/redis/bitfield.d.ts +48 -23
  126. package/dist/storage/redis/bitfield.d.ts.map +1 -1
  127. package/dist/storage/redis/bitfield.js +38 -19
  128. package/dist/storage/redis/bitfield.js.map +1 -1
  129. package/dist/storage/redis/command.d.ts +16 -12
  130. package/dist/storage/redis/command.d.ts.map +1 -1
  131. package/dist/storage/redis/command.js +16 -12
  132. package/dist/storage/redis/command.js.map +1 -1
  133. package/dist/storage/redis/commands.d.ts +99 -100
  134. package/dist/storage/redis/commands.d.ts.map +1 -1
  135. package/dist/storage/redis/commands.js +84 -85
  136. package/dist/storage/redis/commands.js.map +1 -1
  137. package/dist/storage/redis/database.d.ts +138 -122
  138. package/dist/storage/redis/database.d.ts.map +1 -1
  139. package/dist/storage/redis/database.js +120 -101
  140. package/dist/storage/redis/database.js.map +1 -1
  141. package/dist/storage/redis/mod.d.ts +52 -48
  142. package/dist/storage/redis/mod.d.ts.map +1 -1
  143. package/dist/storage/redis/mod.js +52 -48
  144. package/dist/storage/redis/mod.js.map +1 -1
  145. package/dist/storage/redis/options.d.ts +26 -24
  146. package/dist/storage/redis/options.d.ts.map +1 -1
  147. package/dist/storage/redis/options.js.map +1 -1
  148. package/dist/storage/redis/pubsub.d.ts +16 -16
  149. package/dist/storage/redis/pubsub.d.ts.map +1 -1
  150. package/dist/storage/redis/pubsub.js +14 -14
  151. package/dist/storage/redis/pubsub.js.map +1 -1
  152. package/dist/storage/redis/reply.d.ts +80 -72
  153. package/dist/storage/redis/reply.d.ts.map +1 -1
  154. package/dist/storage/redis/reply.js +53 -46
  155. package/dist/storage/redis/reply.js.map +1 -1
  156. package/dist/storage/redis/scan.d.ts +4 -4
  157. package/dist/storage/redis/scan.d.ts.map +1 -1
  158. package/dist/storage/redis/scan.js +6 -6
  159. package/dist/storage/redis/scan.js.map +1 -1
  160. package/dist/storage/redis/script.d.ts +28 -21
  161. package/dist/storage/redis/script.d.ts.map +1 -1
  162. package/dist/storage/redis/script.js +29 -22
  163. package/dist/storage/redis/script.js.map +1 -1
  164. package/dist/storage/redis/target.d.ts +17 -1
  165. package/dist/storage/redis/target.d.ts.map +1 -1
  166. package/dist/storage/redis/target.js +30 -1
  167. package/dist/storage/redis/target.js.map +1 -1
  168. package/dist/storage/redis/wire.d.ts +6 -6
  169. package/dist/storage/redis/wire.d.ts.map +1 -1
  170. package/dist/storage/redis/wire.js +6 -6
  171. package/dist/storage/redis/wire.js.map +1 -1
  172. package/dist/testing/mod.d.ts +83 -88
  173. package/dist/testing/mod.d.ts.map +1 -1
  174. package/dist/testing/mod.js +75 -81
  175. package/dist/testing/mod.js.map +1 -1
  176. package/dist/testing/playwright.d.ts +28 -32
  177. package/dist/testing/playwright.d.ts.map +1 -1
  178. package/dist/testing/playwright.js +22 -27
  179. package/dist/testing/playwright.js.map +1 -1
  180. package/dist/testing/puppeteer.d.ts +11 -12
  181. package/dist/testing/puppeteer.d.ts.map +1 -1
  182. package/dist/testing/puppeteer.js +17 -18
  183. package/dist/testing/puppeteer.js.map +1 -1
  184. package/dist/testing/system.d.ts +72 -90
  185. package/dist/testing/system.d.ts.map +1 -1
  186. package/dist/testing/system.js +90 -107
  187. package/dist/testing/system.js.map +1 -1
  188. package/dist/tsconfig.build.tsbuildinfo +1 -1
  189. package/frontends/mod.test.ts +6 -2
  190. package/frontends/mod.ts +20 -19
  191. package/gateway/errors.ts +30 -32
  192. package/gateway/match.ts +61 -57
  193. package/gateway/middleware.ts +62 -64
  194. package/gateway/mod.ts +73 -76
  195. package/gateway/request.ts +143 -140
  196. package/gateway/serve.ts +58 -63
  197. package/gateways/mod.ts +25 -23
  198. package/internal/runtime/napi/napi.cjs +1 -1
  199. package/internal/runtime/napi/napi.d.cts +10 -3
  200. package/internal/runtime/shutdown.ts +113 -101
  201. package/log/logger.test.ts +8 -0
  202. package/log/logger.ts +48 -45
  203. package/metrics/mod.ts +138 -122
  204. package/otel.ts +6 -3
  205. package/package.json +1 -1
  206. package/pubsub/subscription.ts +93 -123
  207. package/pubsub/topic.ts +96 -130
  208. package/reqctx/mod.ts +83 -86
  209. package/services/index.ts +78 -78
  210. package/shutdown/mod.ts +26 -25
  211. package/storage/clickhouse/database.ts +115 -129
  212. package/storage/clickhouse/errors.ts +27 -29
  213. package/storage/clickhouse/mod.ts +10 -10
  214. package/storage/objects/bucket.ts +209 -239
  215. package/storage/objects/error.ts +4 -4
  216. package/storage/postgres/database.ts +131 -164
  217. package/storage/postgres/errors.ts +45 -52
  218. package/storage/postgres/interval.ts +21 -21
  219. package/storage/redis/bitfield.ts +51 -26
  220. package/storage/redis/command.ts +16 -12
  221. package/storage/redis/commands.ts +99 -100
  222. package/storage/redis/database.ts +145 -123
  223. package/storage/redis/mod.ts +52 -48
  224. package/storage/redis/options.ts +26 -24
  225. package/storage/redis/pubsub.ts +14 -14
  226. package/storage/redis/redis.test.ts +17 -2
  227. package/storage/redis/reply.ts +85 -77
  228. package/storage/redis/scan.ts +6 -6
  229. package/storage/redis/script.ts +29 -22
  230. package/storage/redis/target.ts +34 -1
  231. package/storage/redis/wire.ts +8 -8
  232. package/testing/mod.ts +99 -105
  233. package/testing/playwright.ts +32 -37
  234. package/testing/puppeteer.ts +22 -23
  235. package/testing/system.ts +117 -133
@@ -7,58 +7,51 @@ import { Reply } from './reply.js';
7
7
  import { Invocation, QueuedInvocation, Script } from './script.js';
8
8
  import { ConnTarget, PoolTarget, type Target } from './target.js';
9
9
  /**
10
- * A database's configuration. Encore reads it from the declaration, so its
11
- * fields must be literals.
10
+ * Configuration options for a Redis database. Encore reads this statically
11
+ * from the declaration, so all fields must be literals.
12
12
  */
13
13
  export interface DatabaseConfig {
14
14
  /**
15
- * The data must survive a restart, and is never evicted. Without it a
16
- * database is a cache: what it holds may be lost or evicted.
15
+ * Whether data must survive restarts and never be evicted. When omitted or
16
+ * `false`, the database acts as a cache and its data may be lost or evicted.
17
17
  */
18
18
  persistent?: boolean;
19
19
  /**
20
- * Tags that classify the database, for policies to read: written out as
21
- * string literals, as in `{data: "pci"}`. Keys and values are lowercase
22
- * letters, digits, `_` and `-`, at most 63 characters; a key starts with a
23
- * letter, and not with `encore`, which is reserved. At most 32 tags.
20
+ * Tags that classify the database for policy evaluation, written as string
21
+ * literals (for example, `{data: "pci"}`). Keys and values may contain
22
+ * lowercase letters, digits, `_`, and `-`, up to 63 characters. Keys must
23
+ * start with a letter and cannot start with the reserved prefix `encore`.
24
+ * At most 32 tags are allowed.
24
25
  */
25
26
  tags?: Record<string, string>;
26
27
  }
27
28
  /**
28
- * A handle to a {@link Database} that can only read, made by
29
- * {@link Database.read} or {@link Database.readPrimary}. Free to pass to other
30
- * code.
29
+ * A read-only handle to a {@link Database}, created by {@link Database.read}
30
+ * or {@link Database.readPrimary}. Safe to pass to other code.
31
31
  *
32
- * Its command groups hold the commands that read, and nothing else.
32
+ * Its command groups expose only read-only commands.
33
33
  */
34
34
  export interface ReadOnlyDatabaseRef extends ReadCommandGroups {
35
35
  }
36
36
  export declare class ReadOnlyDatabaseRef {
37
37
  private readonly t;
38
- /**
39
- * The runtime gives a database one pool for now, on the primary, which
40
- * every handle shares.
41
- */
42
- readonly primary: boolean;
43
38
  /** @internal */
44
- constructor(t: PoolTarget, groups: ReadCommandGroups,
39
+ constructor(t: PoolTarget, groups: ReadCommandGroups);
45
40
  /**
46
- * The runtime gives a database one pool for now, on the primary, which
47
- * every handle shares.
41
+ * Prepares an invocation of `script`, which must have been created with
42
+ * {@link Script.readOnly}.
48
43
  */
49
- primary: boolean);
50
- /** A call to `script`, which must be one made by {@link Script.readOnly}. */
51
44
  script(script: Script): Invocation;
52
45
  /**
53
- * A command the command groups lack, by its name, as
54
- * {@link DatabaseRef.command} sends one. Only a command Redis says doesn't
55
- * write is sent.
46
+ * Prepares an arbitrary Redis command that is not covered by the typed
47
+ * command groups, as described in {@link DatabaseRef.command}. Only commands
48
+ * that Redis marks as read-only are allowed.
56
49
  */
57
50
  command<N extends string>(name: StringLiteral<N>): CommandInvocation;
58
51
  }
59
52
  /**
60
- * A handle to a {@link Database} that can read and write, made by
61
- * {@link Database.write}. Free to pass to other code.
53
+ * A read-write handle to a {@link Database}, created by
54
+ * {@link Database.write}. Safe to pass to other code.
62
55
  */
63
56
  export interface DatabaseRef extends CommandGroups {
64
57
  }
@@ -74,9 +67,9 @@ export declare class DatabaseRef {
74
67
  /** @internal */
75
68
  groups: CommandGroups);
76
69
  /**
77
- * A batch of commands sent in one round trip. Not a transaction: other
78
- * clients' commands may run between them, and one failing does not stop
79
- * the rest.
70
+ * Creates a pipeline that sends a batch of commands in a single round trip.
71
+ * A pipeline is not a transaction: commands from other clients may run
72
+ * between queued commands, and one failing command does not stop the rest.
80
73
  *
81
74
  * ```ts
82
75
  * const pipe = SESSIONS.pipeline();
@@ -87,11 +80,11 @@ export declare class DatabaseRef {
87
80
  */
88
81
  pipeline(): Pipeline;
89
82
  /**
90
- * A transaction (`MULTI`/`EXEC`): the commands queued on it run together,
91
- * with no other client's in between.
83
+ * Creates a transaction (`MULTI`/`EXEC`) whose queued commands run together
84
+ * without commands from other clients interleaving between them.
92
85
  *
93
- * Nothing is sent until {@link Transaction.exec}, so a transaction is never
94
- * left open while the code waits on something else.
86
+ * Nothing is sent until {@link Transaction.exec} is called, so a transaction
87
+ * is never held open while your code awaits other work.
95
88
  *
96
89
  * ```ts
97
90
  * const tx = LEDGER.transaction();
@@ -102,16 +95,16 @@ export declare class DatabaseRef {
102
95
  */
103
96
  transaction(): Transaction;
104
97
  /**
105
- * Takes a connection out of the pool, for what must run on one connection:
106
- * watching keys, then a transaction that depends on them. Return it with
107
- * {@link Connection.close}, or declare it with `await using`.
98
+ * Acquires a dedicated connection from the pool for operations that must run
99
+ * on the same connection, such as watching keys before a transaction. Return
100
+ * it with {@link Connection.close}, or manage it with `await using`.
108
101
  */
109
102
  acquire(): Promise<Connection>;
110
103
  /**
111
- * Runs `body` as an optimistic transaction on `keys`: `body` reads what it
112
- * needs through the connection and queues its changes on the transaction,
113
- * and the changes are applied only if none of `keys` changed in between. If
114
- * one did, `body` runs again.
104
+ * Runs `body` as an optimistic transaction watching `keys`. `body` reads
105
+ * values through the connection and queues writes on the transaction; the
106
+ * transaction commits only if none of `keys` changed in the meantime. If a
107
+ * watched key changes, `body` is retried.
115
108
  *
116
109
  * ```ts
117
110
  * const left = await LEDGER.watch(["balance"], async (conn, tx) => {
@@ -122,38 +115,45 @@ export declare class DatabaseRef {
122
115
  * ```
123
116
  */
124
117
  watch<T>(keys: string[], body: (conn: Connection, tx: WatchedTransaction) => Promise<T>): Promise<T>;
125
- /** A call to `script`, to give its keys and arguments and then invoke. */
118
+ /**
119
+ * Prepares an invocation of `script` so you can attach its keys and
120
+ * arguments and then invoke it.
121
+ */
126
122
  script(script: Script): Invocation;
127
123
  /**
128
- * A command the command groups lack, by its name, which must be a string
129
- * literal: give its arguments in order, marking the keys, then invoke it.
124
+ * Prepares an arbitrary Redis command that is not covered by the typed
125
+ * command groups. Pass the command name as a string literal, add its
126
+ * arguments in order (marking keys with `key()`), and then call `invoke()`.
130
127
  *
131
128
  * ```ts
132
129
  * const freq = await SESSIONS.command("OBJECT").arg("FREQ").key("hot").invoke().number();
133
130
  * ```
134
131
  *
135
- * Encore reads the name to grant the access the command needs. Before it is
136
- * sent, the runtime checks it against Redis's command table, and fails it
137
- * with a `TypeError` if a key it takes isn't passed with `key`, which gives
138
- * it the database's prefix, or if it is one that would reach past the
139
- * database, change a connection other calls share, or has a call of its own
140
- * here (`MULTI`, `SUBSCRIBE`, `EVAL`, `SCAN`, `FLUSHALL`, …). A command the
141
- * table doesn't know, such as a module's, is sent with its keys as marked.
132
+ * Encore reads the command name statically to grant the required access.
133
+ * Before sending the command, the runtime checks it against Redis's command
134
+ * table and throws a `TypeError` if a required key argument was not passed
135
+ * with `key()` (which applies the database's key prefix), or if the command
136
+ * reaches outside the database, modifies a shared connection, or already has
137
+ * a dedicated API (`MULTI`, `SUBSCRIBE`, `EVAL`, `SCAN`, `FLUSHALL`, …).
138
+ * Unknown commands, such as module commands, are sent with their keys as
139
+ * marked.
142
140
  */
143
141
  command<N extends string>(name: StringLiteral<N>): CommandInvocation;
144
142
  /**
145
- * The connection string to connect to this database with, for a client
146
- * other than this SDK.
143
+ * The connection string for connecting to this database from an external
144
+ * client.
147
145
  *
148
- * It connects past the database's key prefix: what that client stores under
149
- * a name is not what this SDK reads under it.
146
+ * Note that external clients connect without the database's key prefix, so
147
+ * keys stored by an external client will not match keys read by this SDK
148
+ * under the same names.
150
149
  */
151
150
  get connectionString(): string;
152
151
  }
153
152
  /**
154
- * A Redis database, backed by a connection pool built on first use.
153
+ * A Redis database backed by a connection pool created on first use.
155
154
  *
156
- * Declare it at module scope; its commands are in its command groups:
155
+ * Declare databases at module scope and run commands through their command
156
+ * groups:
157
157
  *
158
158
  * ```ts
159
159
  * import { Database } from "@encore.dev/sdk/storage/redis";
@@ -165,15 +165,16 @@ export declare class DatabaseRef {
165
165
  * ```
166
166
  */
167
167
  export declare class Database extends DatabaseRef {
168
- private readGroups?;
168
+ private reader?;
169
+ private primaryReader?;
169
170
  /**
170
171
  * Declares a Redis database.
171
172
  *
172
- * Encore reads the name and the configuration from the declaration, so both
173
- * must be literals, and the database must be declared at module scope.
173
+ * Encore reads the name and configuration statically from the declaration, so
174
+ * both must be literals and the database must be declared at module scope.
174
175
  *
175
- * The name must be unique within the Encore application, and be kebab-case.
176
- * Once deployed, never change it: a new database would be created under the
176
+ * The name must be unique within the Encore application and use kebab-case.
177
+ * Once deployed, never rename it — doing so creates a new database under the
177
178
  * new name.
178
179
  */
179
180
  constructor(name: string, cfg?: DatabaseConfig);
@@ -181,30 +182,31 @@ export declare class Database extends DatabaseRef {
181
182
  * References an existing database by name. To declare a new database, use
182
183
  * `new Database(...)` instead.
183
184
  *
184
- * The name must be a string literal, so Encore can resolve it statically. A
185
- * named database takes no configuration: it is configured where it is
185
+ * The name must be a string literal so Encore can resolve it statically. A
186
+ * referenced database takes no configuration; it is configured where it is
186
187
  * declared.
187
188
  */
188
189
  static named<Name extends string>(name: StringLiteral<Name>): Database;
189
- /** A handle to the database that can read and write. */
190
+ /** Returns a read-write handle to the database. */
190
191
  write(): DatabaseRef;
191
192
  /**
192
- * A handle to the database that can only read, which may connect to a read
193
- * replica. To always read from the primary server, use
194
- * {@link Database.readPrimary}.
193
+ * Returns a read-only handle to the database. Reads from a read replica when
194
+ * a read-only connection pool is configured, and from the primary server
195
+ * otherwise. Write commands are rejected before being sent. To always read
196
+ * from the primary server, use {@link Database.readPrimary}.
195
197
  */
196
198
  read(): ReadOnlyDatabaseRef;
197
199
  /**
198
- * A handle to the database that can only read, and connects to the primary
199
- * server even if there are read replicas available.
200
+ * Returns a read-only handle to the database that always reads from the
201
+ * primary server, even when read replicas are available. Write commands are
202
+ * rejected before being sent.
200
203
  */
201
204
  readPrimary(): ReadOnlyDatabaseRef;
202
- private readOnlyGroups;
203
205
  }
204
206
  /**
205
- * A batch of commands sent in one round trip, made by
206
- * {@link DatabaseRef.pipeline}. Not a transaction. Its commands are queued
207
- * through its command groups: `pipe.string.get(...)`.
207
+ * A batch of commands sent in a single round trip, created by
208
+ * {@link DatabaseRef.pipeline}. Not a transaction. Queue commands through its
209
+ * command groups (for example, `pipe.string.get(...)`).
208
210
  */
209
211
  export interface Pipeline extends QueueGroups {
210
212
  }
@@ -213,28 +215,30 @@ export declare class Pipeline {
213
215
  private readonly queued;
214
216
  /** @internal */
215
217
  constructor(t: Target);
216
- /** How many commands are queued. */
218
+ /** The number of commands currently queued. */
217
219
  get length(): number;
218
- /** Queues a call to `script`. Finish it with {@link QueuedInvocation.queue}. */
220
+ /**
221
+ * Prepares a call to `script` to be queued on this pipeline. Call
222
+ * {@link QueuedInvocation.queue} to append it.
223
+ */
219
224
  script(script: Script): QueuedInvocation;
220
225
  /**
221
- * Queues a command the command groups lack, by its name: see
222
- * {@link DatabaseRef.command}. Finish it with
223
- * {@link QueuedCommandInvocation.queue}. A command that blocks can't be
224
- * queued: the batch fails.
226
+ * Prepares an arbitrary Redis command (see {@link DatabaseRef.command}) to
227
+ * be queued on this pipeline. Call {@link QueuedCommandInvocation.queue} to
228
+ * append it. Blocking commands cannot be queued and will fail the batch.
225
229
  */
226
230
  command<N extends string>(name: StringLiteral<N>): QueuedCommandInvocation;
227
231
  /**
228
- * Sends the queued commands and returns their replies, in order. If the
229
- * server rejected any, fails with a {@link BatchError} holding them all.
230
- * The pipeline is empty afterwards.
232
+ * Sends all queued commands and returns their replies in order. If the server
233
+ * rejects any command, throws a {@link BatchError} containing all replies.
234
+ * Clears the pipeline afterwards.
231
235
  */
232
236
  exec(): Promise<Reply[]>;
233
237
  }
234
238
  /**
235
- * A transaction, made by {@link DatabaseRef.transaction}: the commands queued
236
- * on it, through its command groups, run together, with no other client's in
237
- * between.
239
+ * A transaction created by {@link DatabaseRef.transaction}. Commands queued
240
+ * through its command groups execute together without commands from other
241
+ * clients interleaving between them.
238
242
  */
239
243
  export interface Transaction extends QueueGroups {
240
244
  }
@@ -243,32 +247,36 @@ export declare class Transaction {
243
247
  private readonly queued;
244
248
  /** @internal */
245
249
  constructor(t: Target);
246
- /** How many commands are queued. */
250
+ /** The number of commands currently queued. */
247
251
  get length(): number;
248
- /** Queues a call to `script`. Finish it with {@link QueuedInvocation.queue}. */
252
+ /**
253
+ * Prepares a call to `script` to be queued on this transaction. Call
254
+ * {@link QueuedInvocation.queue} to append it.
255
+ */
249
256
  script(script: Script): QueuedInvocation;
250
257
  /**
251
- * Queues a command the command groups lack, by its name: see
252
- * {@link DatabaseRef.command}. Finish it with
253
- * {@link QueuedCommandInvocation.queue}. A command that blocks can't be
254
- * queued: the batch fails.
258
+ * Prepares an arbitrary Redis command (see {@link DatabaseRef.command}) to
259
+ * be queued on this transaction. Call {@link QueuedCommandInvocation.queue}
260
+ * to append it. Blocking commands cannot be queued and will fail the batch.
255
261
  */
256
262
  command<N extends string>(name: StringLiteral<N>): QueuedCommandInvocation;
257
263
  /**
258
- * Runs the queued commands as one transaction and returns their replies, as
259
- * {@link Pipeline.exec} does. A command the server rejects when it runs does
260
- * not stop the others: Redis has no rollback.
264
+ * Runs all queued commands as a single transaction and returns their replies,
265
+ * matching {@link Pipeline.exec}. If the server rejects a command during
266
+ * execution, the remaining commands still run — Redis does not support
267
+ * rollbacks.
261
268
  */
262
269
  exec(): Promise<Reply[]>;
263
270
  /**
264
- * Abandons the transaction. Nothing was sent, so there is nothing to undo:
265
- * this empties the queue.
271
+ * Discards the transaction by clearing its queue. Because nothing has been
272
+ * sent yet, there is nothing to undo on the server.
266
273
  */
267
274
  discard(): void;
268
275
  }
269
276
  /**
270
- * A transaction on a {@link Connection}, made by {@link Connection.transaction}:
271
- * it does nothing if a key the connection watches has changed.
277
+ * A transaction on a {@link Connection}, created by
278
+ * {@link Connection.transaction}. It aborts without running if any key watched
279
+ * by the connection has changed.
272
280
  */
273
281
  export interface WatchedTransaction extends QueueGroups {
274
282
  }
@@ -277,29 +285,31 @@ export declare class WatchedTransaction {
277
285
  private readonly queued;
278
286
  /** @internal */
279
287
  constructor(t: ConnTarget);
280
- /** How many commands are queued. */
288
+ /** The number of commands currently queued. */
281
289
  get length(): number;
282
- /** Queues a call to `script`. Finish it with {@link QueuedInvocation.queue}. */
290
+ /**
291
+ * Prepares a call to `script` to be queued on this transaction. Call
292
+ * {@link QueuedInvocation.queue} to append it.
293
+ */
283
294
  script(script: Script): QueuedInvocation;
284
295
  /**
285
- * Queues a command the command groups lack, by its name: see
286
- * {@link DatabaseRef.command}. Finish it with
287
- * {@link QueuedCommandInvocation.queue}. A command that blocks can't be
288
- * queued: the batch fails.
296
+ * Prepares an arbitrary Redis command (see {@link DatabaseRef.command}) to
297
+ * be queued on this transaction. Call {@link QueuedCommandInvocation.queue}
298
+ * to append it. Blocking commands cannot be queued and will fail the batch.
289
299
  */
290
300
  command<N extends string>(name: StringLiteral<N>): QueuedCommandInvocation;
291
301
  /**
292
- * Runs the queued commands as one transaction and returns their replies, as
293
- * {@link Transaction.exec} does, or `null` if a watched key changed, in
294
- * which case none of them ran. Either way the connection watches nothing
295
- * afterwards.
302
+ * Runs all queued commands as a single transaction and returns their replies
303
+ * (as in {@link Transaction.exec}), or `null` if a watched key changed (in
304
+ * which case none of the commands ran). Either way, all watches on the
305
+ * connection are cleared afterwards.
296
306
  */
297
307
  exec(): Promise<Reply[] | null>;
298
308
  }
299
309
  /**
300
- * A connection taken out of a database's pool, made by
301
- * {@link DatabaseRef.acquire}. Its commands, in its command groups, run one at
302
- * a time. Return it to the pool with {@link Connection.close}.
310
+ * A dedicated connection acquired from a database's pool via
311
+ * {@link DatabaseRef.acquire}. Commands run sequentially through its command
312
+ * groups. Return it to the pool with {@link Connection.close}.
303
313
  */
304
314
  export interface Connection extends CommandGroups {
305
315
  }
@@ -309,26 +319,32 @@ export declare class Connection implements AsyncDisposable {
309
319
  /** @internal */
310
320
  constructor(impl: runtime.RedisConnection, pool: PoolTarget);
311
321
  /**
312
- * Watches `keys`: a {@link Connection.transaction} then does nothing if any
313
- * of them has changed by the time it is run.
322
+ * Watches `keys` for changes. A subsequent {@link Connection.transaction}
323
+ * will abort without running if any watched key changes before `exec()`.
314
324
  */
315
325
  watch(...keys: string[]): Promise<void>;
316
- /** Stops watching every key. */
326
+ /** Stops watching all keys on this connection. */
317
327
  unwatch(): Promise<void>;
318
- /** A transaction on this connection, which depends on the keys it watches. */
328
+ /**
329
+ * Creates a transaction on this connection that depends on its watched keys.
330
+ */
319
331
  transaction(): WatchedTransaction;
320
- /** A batch of commands sent in one round trip on this connection. */
332
+ /**
333
+ * Creates a pipeline that sends a batch of commands in a single round trip
334
+ * on this connection.
335
+ */
321
336
  pipeline(): Pipeline;
322
- /** A call to `script` on this connection. */
337
+ /** Prepares an invocation of `script` on this connection. */
323
338
  script(script: Script): Invocation;
324
339
  /**
325
- * A command the command groups lack, on this connection: see
326
- * {@link DatabaseRef.command}. One that blocks is refused here.
340
+ * Prepares an arbitrary Redis command on this connection (see
341
+ * {@link DatabaseRef.command}). Blocking commands are not allowed on an
342
+ * acquired connection.
327
343
  */
328
344
  command<N extends string>(name: StringLiteral<N>): CommandInvocation;
329
345
  /**
330
- * Returns the connection to its pool. Keys it still watches are unwatched
331
- * first.
346
+ * Returns the connection to its pool, automatically unwatching any keys that
347
+ * are still watched.
332
348
  */
333
349
  close(): Promise<void>;
334
350
  [Symbol.asyncDispose](): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../storage/redis/database.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,KAAK,OAAO,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EAExB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAa,KAAK,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAC,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,KAAK,MAAM,EAAC,MAAM,UAAU,CAAC;AAG7D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAUD;;;;;;GAMG;AAGH,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;CAAG;AAEjE,qBAAa,mBAAmB;IAG5B,OAAO,CAAC,QAAQ,CAAC,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO;IAR3B,gBAAgB;gBAEG,CAAC,EAAE,UA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