@palbase/backend 38.0.16 → 39.0.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 (58) hide show
  1. package/dist/bin/palbase-backend.cjs +46 -1
  2. package/dist/bin/palbase-backend.cjs.map +1 -1
  3. package/dist/bin/palbase-backend.js +5 -5
  4. package/dist/{chunk-LFUNRWUE.js → chunk-4J6I4KVQ.js} +67 -3
  5. package/dist/{chunk-LFUNRWUE.js.map → chunk-4J6I4KVQ.js.map} +1 -1
  6. package/dist/{chunk-7WAGQ3VR.js → chunk-AR2I4M7I.js} +497 -17
  7. package/dist/chunk-AR2I4M7I.js.map +1 -0
  8. package/dist/{chunk-YANGWAIM.js → chunk-H7EKL6HC.js} +2 -2
  9. package/dist/{chunk-EHKEMHB4.js → chunk-JJSR4BUX.js} +49 -5
  10. package/dist/chunk-JJSR4BUX.js.map +1 -0
  11. package/dist/{chunk-CS6NQ6PO.js → chunk-JPTFYHP3.js} +2 -2
  12. package/dist/{chunk-CS6NQ6PO.js.map → chunk-JPTFYHP3.js.map} +1 -1
  13. package/dist/{chunk-X7UR3VXA.js → chunk-XZWOMPD3.js} +3 -2
  14. package/dist/chunk-XZWOMPD3.js.map +1 -0
  15. package/dist/{chunk-PDD55QWN.js → chunk-ZNQDL466.js} +2 -2
  16. package/dist/db/index.cjs +378 -14
  17. package/dist/db/index.cjs.map +1 -1
  18. package/dist/db/index.d.cts +1 -1
  19. package/dist/db/index.d.ts +1 -1
  20. package/dist/db/index.js +3 -3
  21. package/dist/engine/index.cjs +46 -1
  22. package/dist/engine/index.cjs.map +1 -1
  23. package/dist/engine/index.d.cts +3 -3
  24. package/dist/engine/index.d.ts +3 -3
  25. package/dist/engine/index.js +5 -5
  26. package/dist/{index-CI7S0Wqv.d.cts → index-B0mjUnxy.d.cts} +25 -2
  27. package/dist/{index-CUy50OLU.d.ts → index-eN4KzGa5.d.ts} +555 -29
  28. package/dist/{index-DRx880KY.d.cts → index-pK2At5Yc.d.cts} +555 -29
  29. package/dist/{index-Ogi30dbt.d.ts → index-yDno9Ju9.d.ts} +25 -2
  30. package/dist/index.cjs +628 -17
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +183 -8
  33. package/dist/index.d.ts +183 -8
  34. package/dist/index.js +74 -6
  35. package/dist/index.js.map +1 -1
  36. package/dist/openapi/index.cjs.map +1 -1
  37. package/dist/openapi/index.d.cts +2 -2
  38. package/dist/openapi/index.d.ts +2 -2
  39. package/dist/openapi/index.js +2 -2
  40. package/dist/{registry-C7UCkQf0.d.cts → registry-9dNeVN5d.d.cts} +1 -1
  41. package/dist/{registry-DJcvbomD.d.ts → registry-B8ddZiMY.d.ts} +1 -1
  42. package/dist/test/index.cjs +19 -0
  43. package/dist/test/index.cjs.map +1 -1
  44. package/dist/test/index.d.cts +1 -1
  45. package/dist/test/index.d.ts +1 -1
  46. package/dist/test/index.js +20 -2
  47. package/dist/test/index.js.map +1 -1
  48. package/docs/README.md +1 -1
  49. package/docs/database.md +79 -0
  50. package/docs/llms-full.txt +462 -33
  51. package/docs/schema.md +382 -32
  52. package/package.json +1 -1
  53. package/template/package.json +1 -1
  54. package/dist/chunk-7WAGQ3VR.js.map +0 -1
  55. package/dist/chunk-EHKEMHB4.js.map +0 -1
  56. package/dist/chunk-X7UR3VXA.js.map +0 -1
  57. /package/dist/{chunk-YANGWAIM.js.map → chunk-H7EKL6HC.js.map} +0 -0
  58. /package/dist/{chunk-PDD55QWN.js.map → chunk-ZNQDL466.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { OpenApiGeneratorV31 } from '@asteasolutions/zod-to-openapi';
2
2
  import { ZodTypeAny } from 'zod';
3
- import { A as AuthSpec, R as RateLimitConfig } from '../index-DRx880KY.cjs';
4
- import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-C7UCkQf0.cjs';
3
+ import { A as AuthSpec, R as RateLimitConfig } from '../index-pK2At5Yc.cjs';
4
+ import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-9dNeVN5d.cjs';
5
5
  import '../db/env.cjs';
6
6
  import '../stack.cjs';
7
7
  import 'node:async_hooks';
@@ -1,7 +1,7 @@
1
1
  import { OpenApiGeneratorV31 } from '@asteasolutions/zod-to-openapi';
2
2
  import { ZodTypeAny } from 'zod';
3
- import { A as AuthSpec, R as RateLimitConfig } from '../index-CUy50OLU.js';
4
- import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-DJcvbomD.js';
3
+ import { A as AuthSpec, R as RateLimitConfig } from '../index-eN4KzGa5.js';
4
+ import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-B8ddZiMY.js';
5
5
  import '../db/env.js';
6
6
  import '../stack.js';
7
7
  import 'node:async_hooks';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getErrorRegistry
3
- } from "../chunk-PDD55QWN.js";
3
+ } from "../chunk-ZNQDL466.js";
4
4
  import {
5
5
  getRoom,
6
6
  getRoutes,
@@ -8,7 +8,7 @@ import {
8
8
  resolveController,
9
9
  resolveEffectiveAuth
10
10
  } from "../chunk-JJW3L62T.js";
11
- import "../chunk-CS6NQ6PO.js";
11
+ import "../chunk-JPTFYHP3.js";
12
12
  import {
13
13
  __commonJS,
14
14
  __name,
@@ -1,4 +1,4 @@
1
- import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './index-DRx880KY.cjs';
1
+ import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './index-pK2At5Yc.cjs';
2
2
  import { ZodTypeAny } from 'zod';
3
3
  import { PalbaseBucketName } from './stack.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './index-CUy50OLU.js';
1
+ import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './index-eN4KzGa5.js';
2
2
  import { ZodTypeAny } from 'zod';
3
3
  import { PalbaseBucketName } from './stack.js';
4
4
 
@@ -2486,6 +2486,24 @@ function createMockDB() {
2486
2486
  throw new Error(`lockRows(${table}): \u015Fu id'ler yok: ${missing.join(", ")} \u2014 kilitlenecek sat\u0131r bulunamad\u0131.`);
2487
2487
  }
2488
2488
  },
2489
+ /**
2490
+ * `lockRowsWhere` — `lockRows` ile AYNI gerekçe, aynı parite seviyesi.
2491
+ *
2492
+ * Kilit tek işlemli bir sahte depoda anlamsız, ama motorun REDDETTİĞİ bir
2493
+ * çağrı burada da reddedilmeli: boş filtre (bütün tabloyu kilitlemek) ve
2494
+ * tanınmayan bir kilit modu. Fake bunları geçirseydi, yazarın testi
2495
+ * üretimde patlayan bir çağrıya karşı yeşil olurdu.
2496
+ */
2497
+ async lockRowsWhere(table, where, opts) {
2498
+ const mode = opts?.mode ?? "update";
2499
+ if (mode !== "update" && mode !== "share" && mode !== "noKeyUpdate") {
2500
+ throw new Error(`lockRowsWhere(${table}): bilinmeyen mode "${String(mode)}" \u2014 "update", "share" ya da "noKeyUpdate".`);
2501
+ }
2502
+ if (Object.keys(where).length === 0) throw new Error(`lockRowsWhere(${table}): bo\u015F filtre`);
2503
+ assertUsableFilter("lockRowsWhere", table, where);
2504
+ refuseFragment("lockRowsWhere", table, where);
2505
+ (store.get(table) ?? []).filter((r) => rowMatchesFilter("lockRowsWhere", table, r, where));
2506
+ },
2489
2507
  /** Sahte depoda kilit yok; sözleşme (çağrı patlamaz) korunuyor. */
2490
2508
  async advisoryXactLock(_key) {
2491
2509
  return void 0;
@@ -3060,6 +3078,7 @@ function makeTypedSurface(raw) {
3060
3078
  $facets: /* @__PURE__ */ __name((table, params) => reco.facets(table, params), "$facets"),
3061
3079
  $claim: /* @__PURE__ */ __name((table, unique, extra) => reco.claim(table, unique, extra), "$claim"),
3062
3080
  $lockRows: /* @__PURE__ */ __name((table, ids) => reco.lockRows(table, ids), "$lockRows"),
3081
+ $lockRowsWhere: /* @__PURE__ */ __name((table, where, opts) => reco.lockRowsWhere(table, where, opts), "$lockRowsWhere"),
3063
3082
  $advisoryXactLock: /* @__PURE__ */ __name((key) => reco.advisoryXactLock(key), "$advisoryXactLock"),
3064
3083
  $aggregate: /* @__PURE__ */ __name((table, q) => raw.aggregate(table, q), "$aggregate"),
3065
3084
  $insertMany: /* @__PURE__ */ __name((table, rows, opts) => raw.insertMany(table, rows, opts), "$insertMany"),