@palbase/backend 38.0.15 → 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
@@ -3,16 +3,16 @@ import {
3
3
  BootRefused,
4
4
  createApp,
5
5
  loadConfig
6
- } from "../chunk-EHKEMHB4.js";
7
- import "../chunk-YANGWAIM.js";
6
+ } from "../chunk-JJSR4BUX.js";
7
+ import "../chunk-H7EKL6HC.js";
8
8
  import "../chunk-GHNC2UHS.js";
9
- import "../chunk-X7UR3VXA.js";
9
+ import "../chunk-XZWOMPD3.js";
10
10
  import "../chunk-FFO36MQQ.js";
11
- import "../chunk-LFUNRWUE.js";
11
+ import "../chunk-4J6I4KVQ.js";
12
12
  import {
13
13
  getRegisteredControllers
14
14
  } from "../chunk-JJW3L62T.js";
15
- import "../chunk-CS6NQ6PO.js";
15
+ import "../chunk-JPTFYHP3.js";
16
16
  import {
17
17
  __name
18
18
  } from "../chunk-VXPNPVAG.js";
@@ -911,8 +911,7 @@ function tableToJSON(table, schemaName) {
911
911
  if (table.raw !== void 0 && table.raw.length > 0) {
912
912
  out.rawConstraints = table.raw.map((r) => ({
913
913
  name: r.name,
914
- up: r.up,
915
- down: r.down ?? null
914
+ up: r.up
916
915
  }));
917
916
  }
918
917
  if (table.checks !== void 0 && table.checks.length > 0) {
@@ -929,6 +928,7 @@ function tableToJSON(table, schemaName) {
929
928
  ...i.columns
930
929
  ] : []
931
930
  };
931
+ if (i.unique === true) ix.unique = true;
932
932
  if (i.where !== void 0) ix.where = i.where;
933
933
  if (i.expression !== void 0) ix.expression = i.expression;
934
934
  if (i.sort !== void 0) ix.sort = i.sort;
@@ -939,6 +939,70 @@ function tableToJSON(table, schemaName) {
939
939
  return ix;
940
940
  });
941
941
  }
942
+ if (table.dropConstraints !== void 0 && table.dropConstraints.length > 0) {
943
+ out.dropConstraints = [
944
+ ...table.dropConstraints
945
+ ];
946
+ }
947
+ if (table.foreignKeys !== void 0 && table.foreignKeys.length > 0) {
948
+ out.foreignKeys = table.foreignKeys.map((fk) => {
949
+ const j = {
950
+ name: fk.name,
951
+ columns: [
952
+ ...fk.columns
953
+ ],
954
+ refTable: fk.refTable,
955
+ refColumns: [
956
+ ...fk.refColumns
957
+ ]
958
+ };
959
+ if (fk.onUpdate !== void 0) j.onUpdate = fk.onUpdate;
960
+ if (fk.onDelete !== void 0) j.onDelete = fk.onDelete;
961
+ if (fk.match !== void 0) j.match = fk.match;
962
+ return j;
963
+ });
964
+ }
965
+ if (table.freeze !== void 0 && table.freeze.length > 0) {
966
+ out.freeze = table.freeze.map((f) => ({
967
+ name: f.name,
968
+ when: f.when,
969
+ columns: [
970
+ ...f.columns
971
+ ],
972
+ refTable: f.refTable,
973
+ refColumns: [
974
+ ...f.refColumns
975
+ ]
976
+ }));
977
+ }
978
+ if (table.guards !== void 0 && table.guards.length > 0) {
979
+ out.guards = table.guards.map((g) => ({
980
+ name: g.name,
981
+ event: g.event,
982
+ ...g.when !== void 0 ? {
983
+ when: g.when
984
+ } : {},
985
+ ...g.exists !== void 0 ? {
986
+ exists: g.exists
987
+ } : {},
988
+ message: g.message,
989
+ ...g.detail !== void 0 ? {
990
+ detail: g.detail
991
+ } : {},
992
+ ...g.hint !== void 0 ? {
993
+ hint: g.hint
994
+ } : {},
995
+ ...g.column !== void 0 ? {
996
+ column: g.column
997
+ } : {}
998
+ }));
999
+ }
1000
+ if (table.backfills !== void 0 && table.backfills.length > 0) {
1001
+ out.backfills = table.backfills.map((b) => ({
1002
+ name: b.name,
1003
+ sql: b.sql
1004
+ }));
1005
+ }
942
1006
  if (table.appendOnly === true) out.appendOnly = true;
943
1007
  if (table.search !== void 0) {
944
1008
  const vectorColumn = Object.entries(columns).find(([, c]) => c.dimensions !== void 0)?.[0];
@@ -1056,4 +1120,4 @@ export {
1056
1120
  qualifiedTableKey,
1057
1121
  toSchemaJSON
1058
1122
  };
1059
- //# sourceMappingURL=chunk-LFUNRWUE.js.map
1123
+ //# sourceMappingURL=chunk-4J6I4KVQ.js.map