@rebasepro/server 0.24.0 → 0.24.1-canary.g56af4a4

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 (181) hide show
  1. package/dist/GCSStorageController-DivE9bAx.js +402 -0
  2. package/dist/GCSStorageController-DivE9bAx.js.map +1 -0
  3. package/dist/S3StorageController-D_vKs4kP.js +480 -0
  4. package/dist/S3StorageController-D_vKs4kP.js.map +1 -0
  5. package/dist/api/rest/api-generator.d.ts +53 -1
  6. package/dist/api/rest/auth-collection-writes.d.ts +28 -21
  7. package/dist/api/rest/field-access-query.d.ts +28 -8
  8. package/dist/api/rest/field-ops.d.ts +19 -7
  9. package/dist/api/rest/query-body.d.ts +10 -0
  10. package/dist/api/rest/write-validation.d.ts +7 -5
  11. package/dist/api/schema-editor-routes.d.ts +10 -1
  12. package/dist/api/sql-export-routes.d.ts +8 -0
  13. package/dist/api/types.d.ts +11 -0
  14. package/dist/{ast-schema-editor-CWqS_sLJ.js → ast-schema-editor-CSdL0iCk.js} +2 -2
  15. package/dist/{ast-schema-editor-CWqS_sLJ.js.map → ast-schema-editor-CSdL0iCk.js.map} +1 -1
  16. package/dist/auth/access.d.ts +16 -0
  17. package/dist/auth/admin-user-ops.d.ts +24 -2
  18. package/dist/auth/admin-users-route.d.ts +1 -0
  19. package/dist/auth/expired-token-sweep.d.ts +5 -1
  20. package/dist/auth/interfaces.d.ts +10 -0
  21. package/dist/auth/jwt-crypto.d.ts +7 -0
  22. package/dist/auth/jwt-keys.d.ts +4 -0
  23. package/dist/auth/jwt.d.ts +6 -1
  24. package/dist/auth/rate-limiter.d.ts +13 -1
  25. package/dist/auth/registration-policy.d.ts +17 -0
  26. package/dist/auth/user-picking.d.ts +35 -0
  27. package/dist/{auth-DMLngxn_.js → auth-OPq_FeMs.js} +972 -85
  28. package/dist/auth-OPq_FeMs.js.map +1 -0
  29. package/dist/auth_adapter-CIItCTc8.js +21 -0
  30. package/dist/auth_adapter-CIItCTc8.js.map +1 -0
  31. package/dist/backend-DTAOsLQc.js.map +1 -1
  32. package/dist/backup/backup-common.d.ts +14 -3
  33. package/dist/backup/backup-routes.d.ts +23 -2
  34. package/dist/backup/backup-storage.d.ts +3 -1
  35. package/dist/backup/index.d.ts +3 -1
  36. package/dist/{backup-CN0s50D2.js → backup-5d7XhLX3.js} +170 -33
  37. package/dist/backup-5d7XhLX3.js.map +1 -0
  38. package/dist/boot/driver.d.ts +3 -0
  39. package/dist/boot/env.d.ts +7 -0
  40. package/dist/boot/http-server.d.ts +22 -0
  41. package/dist/boot/options.d.ts +16 -1
  42. package/dist/boot/runtime-cors.d.ts +17 -0
  43. package/dist/boot/static-routing.d.ts +9 -0
  44. package/dist/{contract-routes-fz8i4pxs.js → contract-routes-02lASyJI.js} +3 -19
  45. package/dist/contract-routes-02lASyJI.js.map +1 -0
  46. package/dist/cron/cron-routes.d.ts +1 -1
  47. package/dist/cron/cron-scheduler.d.ts +69 -3
  48. package/dist/cron/cron-store.d.ts +27 -4
  49. package/dist/cron/define-cron.d.ts +6 -2
  50. package/dist/cron/index.d.ts +1 -1
  51. package/dist/{cron-loader-CwaANlOG.js → cron-loader-D7OmleAb.js} +8 -4
  52. package/dist/cron-loader-D7OmleAb.js.map +1 -0
  53. package/dist/{cron-routes-Bc-SB0Se.js → cron-routes-CBfiaqEL.js} +27 -4
  54. package/dist/cron-routes-CBfiaqEL.js.map +1 -0
  55. package/dist/{cron-scheduler-CYQgco86.js → cron-scheduler-C2vbETMo.js} +298 -32
  56. package/dist/cron-scheduler-C2vbETMo.js.map +1 -0
  57. package/dist/cron-store-B2Ih0gCN.js +540 -0
  58. package/dist/cron-store-B2Ih0gCN.js.map +1 -0
  59. package/dist/email/smtp-email-service.d.ts +23 -0
  60. package/dist/email/types.d.ts +18 -0
  61. package/dist/env.d.ts +0 -37
  62. package/dist/filter-dialect-REl-TjZr.js +1628 -0
  63. package/dist/filter-dialect-REl-TjZr.js.map +1 -0
  64. package/dist/{function-loader-D7o5Epjj.js → function-loader-BDKKiBmy.js} +4 -3
  65. package/dist/function-loader-BDKKiBmy.js.map +1 -0
  66. package/dist/{function-routes-CaNG4waN.js → function-routes-DWB7BBsi.js} +2 -2
  67. package/dist/function-routes-DWB7BBsi.js.map +1 -0
  68. package/dist/functions/context.d.ts +9 -0
  69. package/dist/functions/define-function.d.ts +7 -4
  70. package/dist/functions/index.d.ts +1 -1
  71. package/dist/functions/index.js +25 -2
  72. package/dist/functions/index.js.map +1 -1
  73. package/dist/functions/request-timeout.d.ts +7 -5
  74. package/dist/history/history-routes.d.ts +9 -0
  75. package/dist/history/retention-sweep.d.ts +81 -0
  76. package/dist/{history-recorder-Nr8zLvoU.js → history-recorder-DHenr3lm.js} +2 -2
  77. package/dist/{history-recorder-Nr8zLvoU.js.map → history-recorder-DHenr3lm.js.map} +1 -1
  78. package/dist/{history-store-rcAm_xFR.js → history-store-DPofGVDp.js} +2 -2
  79. package/dist/{history-store-rcAm_xFR.js.map → history-store-DPofGVDp.js.map} +1 -1
  80. package/dist/index.d.ts +6 -5
  81. package/dist/index.es.js +22671 -19191
  82. package/dist/index.es.js.map +1 -1
  83. package/dist/init/shutdown.d.ts +12 -2
  84. package/dist/init.d.ts +16 -6
  85. package/dist/internal-tables-L2t39RdT.js +136 -0
  86. package/dist/internal-tables-L2t39RdT.js.map +1 -0
  87. package/dist/jobs/job-queue.d.ts +8 -0
  88. package/dist/jobs/job-store.d.ts +24 -0
  89. package/dist/jobs/types.d.ts +25 -4
  90. package/dist/{jobs-DqYNfquG.js → jobs-BpD4Q0qR.js} +232 -22
  91. package/dist/jobs-BpD4Q0qR.js.map +1 -0
  92. package/dist/{jwt-R6bSPMjk.js → jwt-Bqcu7cGt.js} +171 -65
  93. package/dist/jwt-Bqcu7cGt.js.map +1 -0
  94. package/dist/load-failure-UvzZgGXT.js +48 -0
  95. package/dist/load-failure-UvzZgGXT.js.map +1 -0
  96. package/dist/mcp/mcp-tools.d.ts +8 -0
  97. package/dist/metrics/index.d.ts +18 -0
  98. package/dist/metrics/pool-wait.d.ts +50 -0
  99. package/dist/offline-8Ks3yp9n-CadBKm2D.js +3305 -0
  100. package/dist/offline-8Ks3yp9n-CadBKm2D.js.map +1 -0
  101. package/dist/offline-store-D9ytNNaa-BCr2vsFB.js +1903 -0
  102. package/dist/offline-store-D9ytNNaa-BCr2vsFB.js.map +1 -0
  103. package/dist/{openapi-generator-DAq_XVDu.js → openapi-generator-BqoUh4Ij.js} +365 -81
  104. package/dist/openapi-generator-BqoUh4Ij.js.map +1 -0
  105. package/dist/policy-PdzX-Opd.js +121 -0
  106. package/dist/policy-PdzX-Opd.js.map +1 -0
  107. package/dist/project_manifest-R6y_KHms.js +59 -0
  108. package/dist/project_manifest-R6y_KHms.js.map +1 -0
  109. package/dist/{query-parser-BgiKJKvc.js → query-parser-DK9eMkb9.js} +510 -15
  110. package/dist/query-parser-DK9eMkb9.js.map +1 -0
  111. package/dist/{request-timeout-DgH7j8qO.js → request-timeout-Dnl2_OBc.js} +15 -8
  112. package/dist/request-timeout-Dnl2_OBc.js.map +1 -0
  113. package/dist/resumable-upload-threshold-CKv-Ry0l.js +24 -0
  114. package/dist/resumable-upload-threshold-CKv-Ry0l.js.map +1 -0
  115. package/dist/schema-edit/apply-schema-change.d.ts +10 -0
  116. package/dist/schema-edit/local-source.d.ts +29 -0
  117. package/dist/schema-edit/remote-source.d.ts +13 -3
  118. package/dist/schema-edit/source-editor.d.ts +28 -0
  119. package/dist/{schema-editor-routes-oIyuWl3L.js → schema-editor-routes-BFf3i8jm.js} +53 -9
  120. package/dist/schema-editor-routes-BFf3i8jm.js.map +1 -0
  121. package/dist/services/outbound-post.d.ts +50 -0
  122. package/dist/services/outbound-url-guard.d.ts +34 -5
  123. package/dist/services/routed-realtime-service.d.ts +5 -0
  124. package/dist/services/webhook-service.d.ts +66 -14
  125. package/dist/soft-delete-params-47yBGs3_.js +668 -0
  126. package/dist/soft-delete-params-47yBGs3_.js.map +1 -0
  127. package/dist/sql-export-routes-BNNuGGLP.js +240 -0
  128. package/dist/sql-export-routes-BNNuGGLP.js.map +1 -0
  129. package/dist/src-CatHFUym.js.map +1 -1
  130. package/dist/storage/GCSStorageController.d.ts +46 -2
  131. package/dist/storage/LocalStorageController.d.ts +67 -2
  132. package/dist/storage/S3StorageController.d.ts +37 -3
  133. package/dist/storage/image-transform.d.ts +5 -0
  134. package/dist/storage/maintenance-routes.d.ts +23 -0
  135. package/dist/storage/maintenance.d.ts +126 -0
  136. package/dist/storage/rendition-cache.d.ts +9 -11
  137. package/dist/storage/request-principals.d.ts +30 -0
  138. package/dist/storage/routes.d.ts +20 -0
  139. package/dist/storage/source-variables.d.ts +10 -0
  140. package/dist/storage/streams.d.ts +42 -0
  141. package/dist/storage/tus-handler.d.ts +46 -2
  142. package/dist/storage/types.d.ts +82 -7
  143. package/dist/storage/upload-validation.d.ts +13 -0
  144. package/dist/storage-resumable-VO-cMpse-C_YX71pO.js +125 -0
  145. package/dist/storage-resumable-VO-cMpse-C_YX71pO.js.map +1 -0
  146. package/dist/strings.es-BeZWAodn.js +256 -0
  147. package/dist/strings.es-BeZWAodn.js.map +1 -0
  148. package/dist/upload-validation-Dd-fnsbA.js +172 -0
  149. package/dist/upload-validation-Dd-fnsbA.js.map +1 -0
  150. package/dist/utils/byte-size.d.ts +10 -0
  151. package/dist/utils/compression.d.ts +6 -0
  152. package/dist/utils/load-failure.d.ts +14 -0
  153. package/package.json +5 -5
  154. package/dist/GCSStorageController-BSiP1c-f.js +0 -256
  155. package/dist/GCSStorageController-BSiP1c-f.js.map +0 -1
  156. package/dist/S3StorageController-CAwFRgjV.js +0 -276
  157. package/dist/S3StorageController-CAwFRgjV.js.map +0 -1
  158. package/dist/auth-DMLngxn_.js.map +0 -1
  159. package/dist/backup-CN0s50D2.js.map +0 -1
  160. package/dist/contract-routes-fz8i4pxs.js.map +0 -1
  161. package/dist/cron-loader-CwaANlOG.js.map +0 -1
  162. package/dist/cron-routes-Bc-SB0Se.js.map +0 -1
  163. package/dist/cron-scheduler-CYQgco86.js.map +0 -1
  164. package/dist/cron-store-D2Q9-Aco.js +0 -300
  165. package/dist/cron-store-D2Q9-Aco.js.map +0 -1
  166. package/dist/dynamic-import-X40pTZUQ.js +0 -23
  167. package/dist/dynamic-import-X40pTZUQ.js.map +0 -1
  168. package/dist/function-loader-D7o5Epjj.js.map +0 -1
  169. package/dist/function-routes-CaNG4waN.js.map +0 -1
  170. package/dist/jobs-DqYNfquG.js.map +0 -1
  171. package/dist/jwt-R6bSPMjk.js.map +0 -1
  172. package/dist/openapi-generator-DAq_XVDu.js.map +0 -1
  173. package/dist/query-parser-BgiKJKvc.js.map +0 -1
  174. package/dist/request-timeout-DgH7j8qO.js.map +0 -1
  175. package/dist/schema-editor-routes-oIyuWl3L.js.map +0 -1
  176. package/dist/soft-delete-params-BWPilMPF.js +0 -59
  177. package/dist/soft-delete-params-BWPilMPF.js.map +0 -1
  178. package/dist/src-I3aG1PcY.js +0 -6870
  179. package/dist/src-I3aG1PcY.js.map +0 -1
  180. package/dist/types-BfKcm9do.js +0 -39
  181. package/dist/types-BfKcm9do.js.map +0 -1
@@ -0,0 +1,48 @@
1
+ import { createRequire as __rebaseCreateRequire } from "module";
2
+ import __rebaseProcess from "process";
3
+ globalThis.process ??= __rebaseProcess;
4
+ __rebaseCreateRequire(import.meta.url);
5
+ import * as path$1 from "path";
6
+ //#region src/utils/dynamic-import.ts
7
+ /**
8
+ * Native ESM dynamic import.
9
+ *
10
+ * Wrapped in `new Function` so TypeScript / bundlers don't down-compile the
11
+ * `import()` to `require()` — the loaders must import user-authored `.ts`/`.js`
12
+ * files at runtime using the host's real ESM loader. This is the production
13
+ * default for {@link loadFunctionsFromDirectory} / {@link loadCronJobsFromDirectory}.
14
+ *
15
+ * @internal
16
+ */
17
+ var nativeDynamicImport = (() => {
18
+ const doImport = new Function("url", "return import(url)");
19
+ return (url) => doImport(url);
20
+ })();
21
+ //#endregion
22
+ //#region src/utils/load-failure.ts
23
+ /**
24
+ * How a function or cron file that failed to import is listed in the boot
25
+ * log: `"<file> (syntax error at <file>:<line>: <message>)"` for a syntax
26
+ * error, `"<file> (threw: <message>)"` for anything else.
27
+ *
28
+ * The two need different remedies. A file that *threw* usually read an
29
+ * undefined env var at module scope; a file with a *syntax error* needs its
30
+ * syntax fixed, and the loaders' advice is keyed on which one this is. Node
31
+ * puts a syntax error's location only in the first line of its stack, so that
32
+ * is where the line number comes from.
33
+ */
34
+ function describeLoadFailure(file, err) {
35
+ const message = err instanceof Error ? err.message : String(err);
36
+ if (err instanceof Error && err.name === "SyntaxError") {
37
+ const firstLine = err.stack?.split("\n", 1)[0] ?? "";
38
+ const at = /:(\d+)(?::\d+)?$/.exec(firstLine);
39
+ return `${file} (syntax error${at ? ` at ${path$1.basename(file)}:${at[1]}` : ""}: ${message})`;
40
+ }
41
+ return `${file} (threw: ${message})`;
42
+ }
43
+ /** The advice for {@link describeLoadFailure}'s syntax-error entries. */
44
+ var SYNTAX_ERROR_ADVICE = " A file with a syntax error never ran: fix the syntax at the line shown (`tsc --noEmit` or your editor will point at it too).";
45
+ //#endregion
46
+ export { describeLoadFailure as n, nativeDynamicImport as r, SYNTAX_ERROR_ADVICE as t };
47
+
48
+ //# sourceMappingURL=load-failure-UvzZgGXT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-failure-UvzZgGXT.js","names":[],"sources":["../src/utils/dynamic-import.ts","../src/utils/load-failure.ts"],"sourcesContent":["/**\n * Shape returned by a dynamic module import: an object whose `default`\n * property holds the module's default export (CJS `module.exports` is exposed\n * as `default` by Node's ESM interop).\n */\nexport interface ImportedModule {\n default?: unknown;\n [key: string]: unknown;\n}\n\n/**\n * Imports a module by file URL. Injected into the directory loaders so tests\n * can supply a deterministic importer.\n */\nexport type ModuleImporter = (url: string) => Promise<ImportedModule>;\n\n/**\n * Native ESM dynamic import.\n *\n * Wrapped in `new Function` so TypeScript / bundlers don't down-compile the\n * `import()` to `require()` — the loaders must import user-authored `.ts`/`.js`\n * files at runtime using the host's real ESM loader. This is the production\n * default for {@link loadFunctionsFromDirectory} / {@link loadCronJobsFromDirectory}.\n *\n * @internal\n */\nexport const nativeDynamicImport: ModuleImporter = (() => {\n const doImport = new Function(\"url\", \"return import(url)\") as (url: string) => Promise<ImportedModule>;\n return (url: string) => doImport(url);\n})();\n","import * as path from \"path\";\n\n/**\n * How a function or cron file that failed to import is listed in the boot\n * log: `\"<file> (syntax error at <file>:<line>: <message>)\"` for a syntax\n * error, `\"<file> (threw: <message>)\"` for anything else.\n *\n * The two need different remedies. A file that *threw* usually read an\n * undefined env var at module scope; a file with a *syntax error* needs its\n * syntax fixed, and the loaders' advice is keyed on which one this is. Node\n * puts a syntax error's location only in the first line of its stack, so that\n * is where the line number comes from.\n */\nexport function describeLoadFailure(file: string, err: unknown): string {\n const message = err instanceof Error ? err.message : String(err);\n // By name, not `instanceof`: the error comes from whatever realm did the\n // import, and its SyntaxError is not this one's.\n if (err instanceof Error && err.name === \"SyntaxError\") {\n const firstLine = err.stack?.split(\"\\n\", 1)[0] ?? \"\";\n const at = /:(\\d+)(?::\\d+)?$/.exec(firstLine);\n const where = at ? ` at ${path.basename(file)}:${at[1]}` : \"\";\n return `${file} (syntax error${where}: ${message})`;\n }\n return `${file} (threw: ${message})`;\n}\n\n/** The advice for {@link describeLoadFailure}'s syntax-error entries. */\nexport const SYNTAX_ERROR_ADVICE =\n \" A file with a syntax error never ran: fix the syntax at the line shown \" +\n \"(`tsc --noEmit` or your editor will point at it too).\";\n"],"mappings":";;;;;;;;;;;;;;;;AA0BA,IAAa,6BAA6C;CACtD,MAAM,WAAW,IAAI,SAAS,OAAO,oBAAoB;CACzD,QAAQ,QAAgB,SAAS,GAAG;AACxC,EAAA,CAAG;;;;;;;;;;;;;;AChBH,SAAgB,oBAAoB,MAAc,KAAsB;CACpE,MAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;CAG/D,IAAI,eAAe,SAAS,IAAI,SAAS,eAAe;EACpD,MAAM,YAAY,IAAI,OAAO,MAAM,MAAM,CAAC,CAAC,CAAC,MAAM;EAClD,MAAM,KAAK,mBAAmB,KAAK,SAAS;EAE5C,OAAO,GAAG,KAAK,gBADD,KAAK,OAAO,OAAK,SAAS,IAAI,EAAE,GAAG,GAAG,OAAO,GACtB,IAAI,QAAQ;CACrD;CACA,OAAO,GAAG,KAAK,WAAW,QAAQ;AACtC;;AAGA,IAAa,sBACT"}
@@ -51,6 +51,14 @@ export interface McpToolDefinition {
51
51
  * to be listed, and on the collection a call names for it to run.
52
52
  */
53
53
  requiredScope: McpScope;
54
+ /**
55
+ * Whether the reply carries the result a second time, as
56
+ * `structuredContent`. The text block always carries it — it is what a
57
+ * model reads. A result a program consumes (rows, a count, a write's
58
+ * outcome) also goes out as typed data; one only a model reads does not,
59
+ * so the reply is not twice its size. Defaults to true.
60
+ */
61
+ structuredContent?: boolean;
54
62
  run(args: Record<string, unknown>, ctx: McpToolContext): Promise<unknown>;
55
63
  }
56
64
  /** An error whose message is safe to hand back to the model. */
@@ -31,11 +31,24 @@ export type MetricSurface = "data" | "auth" | "storage" | "functions" | "admin"
31
31
  | "other";
32
32
  /** Whether a path is the platform looking in, rather than a request served. */
33
33
  export declare function isUncountedPath(pathname: string): boolean;
34
+ /**
35
+ * How long a query waited for a pooled database connection, in milliseconds —
36
+ * opening one included, when the pool had to. Labelled by data source. See
37
+ * `pool-wait.ts`, which records it, and why it matters there.
38
+ */
39
+ export declare const DB_POOL_WAIT_METRIC = "rebase_db_pool_wait_ms";
40
+ /**
41
+ * Buckets for {@link DB_POOL_WAIT_METRIC}. A checkout from a pool with an idle
42
+ * connection takes well under a millisecond, so the low end is finer than a
43
+ * request's: the interesting number is how much of the tail is above zero.
44
+ */
45
+ export declare const POOL_WAIT_BUCKETS_MS: number[];
34
46
  export declare class MetricsRegistry {
35
47
  private requests;
36
48
  private latency;
37
49
  private gauges;
38
50
  private counters;
51
+ private histograms;
39
52
  readonly startedAt: number;
40
53
  private static labelKey;
41
54
  private static parseLabels;
@@ -51,6 +64,11 @@ export declare class MetricsRegistry {
51
64
  recordRequest(labels: Record<string, string>, durationMs: number): void;
52
65
  incrementCounter(name: string, labels?: Record<string, string>, by?: number): void;
53
66
  setGauge(name: string, value: number, labels?: Record<string, string>): void;
67
+ /**
68
+ * Record one observation in a named histogram. `buckets` are its upper
69
+ * bounds, fixed by the first observation of the series.
70
+ */
71
+ observe(name: string, value: number, labels?: Record<string, string>, buckets?: readonly number[]): void;
54
72
  /** Prometheus escaping: backslash, quote and newline, in that order. */
55
73
  private static formatLabels;
56
74
  /** Group `name -> [[labelKey, value]]` for one-HELP-per-metric rendering. */
@@ -0,0 +1,50 @@
1
+ /**
2
+ * How long queries wait for a pooled database connection.
3
+ *
4
+ * A write holds its connection — and its transaction, and the locks it has
5
+ * taken — for as long as its callbacks run: `beforeSave` runs after the
6
+ * transaction has begun, `afterSave` before it commits. Callbacks that await
7
+ * something slow therefore take connections out of the pool for that long, and
8
+ * once enough of them run at once every other request queues for one. Measured
9
+ * with the default pool of 20: 25 concurrent saves whose `beforeSave` awaited
10
+ * 300 ms made an unrelated one-row read wait 290 ms for a connection.
11
+ *
12
+ * Nothing else shows that queue. Request latency rises, but so it does for a
13
+ * slow query; this histogram says how much of a request was spent waiting for
14
+ * a connection at all. Near zero is a healthy pool.
15
+ *
16
+ * @module
17
+ */
18
+ import { type MetricsRegistry } from "./index.js";
19
+ /** `pg.Pool`'s callback form of `connect`, which `pool.query` uses internally. */
20
+ type ConnectCallback = (err: Error | undefined, client: unknown, done: (release?: unknown) => void) => void;
21
+ /**
22
+ * `connect` as a `pg.Pool` has it: a promise without a callback, the callback
23
+ * with one. Both are timed — transactions check out with the first,
24
+ * `pool.query` with the second.
25
+ */
26
+ export type PoolConnect = (callback?: ConnectCallback) => Promise<unknown> | void;
27
+ /**
28
+ * Time every checkout from `pool`, from the call to the moment a connection is
29
+ * handed over, and report it to `record` in milliseconds. A failed checkout is
30
+ * not recorded: it is an error, not a wait.
31
+ *
32
+ * Wraps `connect` on this pool object only. `false` when the pool has no
33
+ * `connect` to time (a driver that is not pool-based) or is timed already.
34
+ */
35
+ export declare function timePoolCheckouts(pool: {
36
+ connect?: PoolConnect;
37
+ }, record: (waitMs: number) => void): boolean;
38
+ /**
39
+ * Time the checkouts of every pool-based data source into `registry`'s
40
+ * {@link DB_POOL_WAIT_METRIC} histogram, labelled by the source's key.
41
+ */
42
+ export declare function recordPoolWaits(registry: MetricsRegistry, sources: readonly {
43
+ key: string;
44
+ connection: {
45
+ pool?: {
46
+ connect?: PoolConnect;
47
+ };
48
+ };
49
+ }[]): void;
50
+ export {};