@rebasepro/server 0.33.2 → 0.34.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 (103) hide show
  1. package/dist/{GCSStorageController-kCv5MH2B.js → GCSStorageController-DKv7oDo7.js} +3 -3
  2. package/dist/{GCSStorageController-kCv5MH2B.js.map → GCSStorageController-DKv7oDo7.js.map} +1 -1
  3. package/dist/{S3StorageController-DqK533Sl.js → S3StorageController-CIQ2_mC5.js} +3 -3
  4. package/dist/{S3StorageController-DqK533Sl.js.map → S3StorageController-CIQ2_mC5.js.map} +1 -1
  5. package/dist/{access-CRQBlEZY.js → access-BdsIXo_L.js} +4 -4
  6. package/dist/{access-CRQBlEZY.js.map → access-BdsIXo_L.js.map} +1 -1
  7. package/dist/api/rest/api-generator.d.ts +11 -1
  8. package/dist/auth/auth-hooks.d.ts +1 -1
  9. package/dist/auth/builtin-auth-adapter.d.ts +2 -0
  10. package/dist/auth/capabilities.d.ts +12 -0
  11. package/dist/auth/platform-signin-routes.d.ts +85 -0
  12. package/dist/auth/platform-token.d.ts +33 -0
  13. package/dist/auth/routes.d.ts +8 -0
  14. package/dist/auth/seed-admin.d.ts +2 -0
  15. package/dist/{auth-BanB_pZj.js → auth-CHOmnYwu.js} +358 -12
  16. package/dist/auth-CHOmnYwu.js.map +1 -0
  17. package/dist/{backup-CVNce2jz.js → backup-M37yPYpz.js} +6 -6
  18. package/dist/{backup-CVNce2jz.js.map → backup-M37yPYpz.js.map} +1 -1
  19. package/dist/boot/bundle.d.ts +12 -0
  20. package/dist/boot/env.d.ts +1 -0
  21. package/dist/{branch-routes-aLDaGOD1.js → branch-routes-Cl-Oa3CL.js} +2 -2
  22. package/dist/{branch-routes-aLDaGOD1.js.map → branch-routes-Cl-Oa3CL.js.map} +1 -1
  23. package/dist/{contract-routes-a4ZbN1h3.js → contract-routes-Dkxl-2B_.js} +3 -3
  24. package/dist/{contract-routes-a4ZbN1h3.js.map → contract-routes-Dkxl-2B_.js.map} +1 -1
  25. package/dist/{cron-loader-CWhyA5eR.js → cron-loader-BWahenzQ.js} +2 -2
  26. package/dist/{cron-loader-CWhyA5eR.js.map → cron-loader-BWahenzQ.js.map} +1 -1
  27. package/dist/{cron-routes-CMGAz1my.js → cron-routes-Cq6O3oPR.js} +4 -4
  28. package/dist/{cron-routes-CMGAz1my.js.map → cron-routes-Cq6O3oPR.js.map} +1 -1
  29. package/dist/{cron-scheduler-DQBdkkfb.js → cron-scheduler-B25NuV7o.js} +2 -2
  30. package/dist/{cron-scheduler-DQBdkkfb.js.map → cron-scheduler-B25NuV7o.js.map} +1 -1
  31. package/dist/{cron-store-CjUydRyp.js → cron-store-B1IStnKM.js} +2 -2
  32. package/dist/{cron-store-CjUydRyp.js.map → cron-store-B1IStnKM.js.map} +1 -1
  33. package/dist/dist-D_R0Khut.js +19354 -0
  34. package/dist/dist-D_R0Khut.js.map +1 -0
  35. package/dist/email/link-base.d.ts +21 -0
  36. package/dist/email/types.d.ts +4 -0
  37. package/dist/{filter-dialect-nsQ2ozPY.js → filter-dialect-DgWkoXt7.js} +2 -2
  38. package/dist/{filter-dialect-nsQ2ozPY.js.map → filter-dialect-DgWkoXt7.js.map} +1 -1
  39. package/dist/{function-loader-Cihj_r86.js → function-loader-C23HVFx8.js} +2 -2
  40. package/dist/{function-loader-Cihj_r86.js.map → function-loader-C23HVFx8.js.map} +1 -1
  41. package/dist/{function-routes-CWaldgEj.js → function-routes-DBKL2azw.js} +2 -2
  42. package/dist/{function-routes-CWaldgEj.js.map → function-routes-DBKL2azw.js.map} +1 -1
  43. package/dist/{history-recorder-B8TJMEfO.js → history-recorder-C5gixsU3.js} +16 -3
  44. package/dist/history-recorder-C5gixsU3.js.map +1 -0
  45. package/dist/history-store-c_cm9R3w.js +459 -0
  46. package/dist/history-store-c_cm9R3w.js.map +1 -0
  47. package/dist/index.d.ts +1 -1
  48. package/dist/index.es.js +273 -236
  49. package/dist/index.es.js.map +1 -1
  50. package/dist/{jobs-IJX3fE3X.js → jobs-uqvEGTfs.js} +2 -2
  51. package/dist/{jobs-IJX3fE3X.js.map → jobs-uqvEGTfs.js.map} +1 -1
  52. package/dist/{jwt-BuEprb39.js → jwt-B_5zx-7y.js} +3 -3
  53. package/dist/{jwt-BuEprb39.js.map → jwt-B_5zx-7y.js.map} +1 -1
  54. package/dist/{keys-C8gpPIOG.js → keys-C0g4vwP5.js} +2 -2
  55. package/dist/{keys-C8gpPIOG.js.map → keys-C0g4vwP5.js.map} +1 -1
  56. package/dist/{load-schema-BvRxAuaD.js → load-schema-aNynBztw.js} +2 -2
  57. package/dist/{load-schema-BvRxAuaD.js.map → load-schema-aNynBztw.js.map} +1 -1
  58. package/dist/{logs-routes-BAq2ZxuY.js → logs-routes-D2NGM5Pa.js} +2 -2
  59. package/dist/{logs-routes-BAq2ZxuY.js.map → logs-routes-D2NGM5Pa.js.map} +1 -1
  60. package/dist/metrics/history-recorder.d.ts +10 -1
  61. package/dist/metrics/history-store.d.ts +122 -7
  62. package/dist/metrics/index.d.ts +24 -2
  63. package/dist/{offline-ET6xI1ZO-CIdB1ilf.js → offline-ET6xI1ZO-Du75S8J1.js} +4 -4
  64. package/dist/{offline-ET6xI1ZO-CIdB1ilf.js.map → offline-ET6xI1ZO-Du75S8J1.js.map} +1 -1
  65. package/dist/{offline-store-DtmBwmKE-CzyvC_Zj.js → offline-store-DtmBwmKE-CEakGPWn.js} +3 -3
  66. package/dist/{offline-store-DtmBwmKE-CzyvC_Zj.js.map → offline-store-DtmBwmKE-CEakGPWn.js.map} +1 -1
  67. package/dist/{openapi-generator-CCLtAJ2s.js → openapi-generator-B7EbCjhN.js} +2 -2
  68. package/dist/{openapi-generator-CCLtAJ2s.js.map → openapi-generator-B7EbCjhN.js.map} +1 -1
  69. package/dist/{project-root-CuCOXvbk.js → project-root-BTQAiPki.js} +2 -2
  70. package/dist/{project-root-CuCOXvbk.js.map → project-root-BTQAiPki.js.map} +1 -1
  71. package/dist/{proxy-DUUXXoQo.js → proxy-0fGXJapt.js} +2 -2
  72. package/dist/{proxy-DUUXXoQo.js.map → proxy-0fGXJapt.js.map} +1 -1
  73. package/dist/{query-parser-C9l1eFov.js → query-parser-DwERE0rm.js} +3 -3
  74. package/dist/{query-parser-C9l1eFov.js.map → query-parser-DwERE0rm.js.map} +1 -1
  75. package/dist/{request-timeout-DOu8ItLQ.js → request-timeout-DdbFS6ef.js} +3 -3
  76. package/dist/{request-timeout-DOu8ItLQ.js.map → request-timeout-DdbFS6ef.js.map} +1 -1
  77. package/dist/{rls-simulator-routes-DIAjffhq.js → rls-simulator-routes-Cjv8yY1V.js} +3 -3
  78. package/dist/{rls-simulator-routes-DIAjffhq.js.map → rls-simulator-routes-Cjv8yY1V.js.map} +1 -1
  79. package/dist/{schema-editor-routes-qWGWBPi0.js → schema-editor-routes-CwdoGYKu.js} +4 -4
  80. package/dist/{schema-editor-routes-qWGWBPi0.js.map → schema-editor-routes-CwdoGYKu.js.map} +1 -1
  81. package/dist/{schema-tables-BneB2KZ7.js → schema-tables-DUThMxen.js} +3 -3
  82. package/dist/{schema-tables-BneB2KZ7.js.map → schema-tables-DUThMxen.js.map} +1 -1
  83. package/dist/{schema-tables-routes-BBZJK8_S.js → schema-tables-routes-Ch52xLqF.js} +4 -4
  84. package/dist/{schema-tables-routes-BBZJK8_S.js.map → schema-tables-routes-Ch52xLqF.js.map} +1 -1
  85. package/dist/{securityRuleToConditions-Cj5ZR7TS.js → securityRuleToConditions-DXPY_Z-x.js} +2 -2
  86. package/dist/{securityRuleToConditions-Cj5ZR7TS.js.map → securityRuleToConditions-DXPY_Z-x.js.map} +1 -1
  87. package/dist/{selection-BB8ejqa2.js → selection-BiTJ-Tiy.js} +2 -2
  88. package/dist/{selection-BB8ejqa2.js.map → selection-BiTJ-Tiy.js.map} +1 -1
  89. package/dist/{sql-export-routes-CPXI3qZ7.js → sql-export-routes-BYt7G2v-.js} +2 -2
  90. package/dist/{sql-export-routes-CPXI3qZ7.js.map → sql-export-routes-BYt7G2v-.js.map} +1 -1
  91. package/dist/{src-BdPKCs9u.js → src--EBfCtYm.js} +2 -2
  92. package/dist/src--EBfCtYm.js.map +1 -0
  93. package/dist/storage/routes.d.ts +6 -0
  94. package/dist/{table-source-editor-D3m_VMwN.js → table-source-editor-P5zp7lOn.js} +3 -3
  95. package/dist/{table-source-editor-D3m_VMwN.js.map → table-source-editor-P5zp7lOn.js.map} +1 -1
  96. package/package.json +5 -5
  97. package/dist/auth-BanB_pZj.js.map +0 -1
  98. package/dist/dist-C1vNURUy.js +0 -19354
  99. package/dist/dist-C1vNURUy.js.map +0 -1
  100. package/dist/history-recorder-B8TJMEfO.js.map +0 -1
  101. package/dist/history-store-DzrJeEKv.js +0 -233
  102. package/dist/history-store-DzrJeEKv.js.map +0 -1
  103. package/dist/src-BdPKCs9u.js.map +0 -1
@@ -2,7 +2,7 @@ import { createRequire as __rebaseCreateRequire } from "module";
2
2
  import __rebaseProcess from "process";
3
3
  globalThis.process ??= __rebaseProcess;
4
4
  __rebaseCreateRequire(import.meta.url);
5
- import { en as DEFAULT_COMMIT_PATHS } from "./src-BdPKCs9u.js";
5
+ import { tn as DEFAULT_COMMIT_PATHS } from "./src--EBfCtYm.js";
6
6
  import path from "node:path";
7
7
  import fs from "node:fs";
8
8
  //#region src/schema-edit/project-root.ts
@@ -111,4 +111,4 @@ function holdsMigrations(dir) {
111
111
  //#endregion
112
112
  export { usesVersionedMigrations as i, commitPathsFor as n, findProjectRoot as r, DEFAULT_SCHEMA_PATH as t };
113
113
 
114
- //# sourceMappingURL=project-root-CuCOXvbk.js.map
114
+ //# sourceMappingURL=project-root-BTQAiPki.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"project-root-CuCOXvbk.js","names":[],"sources":["../src/schema-edit/project-root.ts"],"sourcesContent":["/**\n * Where a project's generated artifacts belong, relative to its repository.\n *\n * `DEFAULT_COMMIT_PATHS` names `backend/src/schema.generated.ts`, which is\n * correct read from the **project** root and wrong read from anywhere else. The repository resolves what it is\n * given against its own root, and those two coincide only when the project is\n * the whole repository.\n *\n * A `rebase init` project is exactly that, so this was invisible. A project in\n * a subdirectory — an app inside a monorepo, this repository's own `app/` —\n * is not: the commit created `backend/` beside `.git`, left the real generated\n * file untouched, and committed a source change alongside a\n * stale schema. That is the failure the commit-the-whole-change design exists\n * to prevent, arriving through the design itself.\n *\n * ## Why `rebase.json`\n *\n * Because the codebase already treats it as the project marker: it is the file\n * the CLI validates as the manifest and the file `rebase resources --write`\n * writes `rebase.resources.json` beside. Using the same anchor means one answer\n * to \"where does this project start\", not two that can disagree.\n */\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { DEFAULT_COMMIT_PATHS, type SchemaCommitPaths } from \"@rebasepro/types\";\n\n/**\n * The nearest ancestor of `startDir` holding a `rebase.json`.\n *\n * Bounded: an unbounded walk from a misconfigured path climbs to the filesystem\n * root and reads whatever it finds there. `undefined` when there is none, which\n * is a project that predates the file — the caller then keeps the historical\n * behaviour rather than guessing.\n */\n/**\n * Where a scaffolded project keeps its schema source, project-relative.\n *\n * A bundle's tables are compiled output, so nothing on the running machine\n * points at this. A deployment committing to a repository states it, and this\n * is the default it states nothing against.\n */\nexport const DEFAULT_SCHEMA_PATH = \"backend/schema\";\n\nexport function findProjectRoot(startDir: string, levels = 5): string | undefined {\n let dir = path.resolve(startDir);\n for (let i = 0; i <= levels; i++) {\n if (fs.existsSync(path.join(dir, \"rebase.json\"))) return dir;\n const parent = path.dirname(dir);\n if (parent === dir) return undefined;\n dir = parent;\n }\n return undefined;\n}\n\n/**\n * The generated-artifact paths for a project, expressed relative to the\n * repository that will hold the commit.\n *\n * Returns `undefined` when there is nothing to correct — no project marker, or\n * a project that *is* the repository — so the caller passes no override and the\n * defaults stand. Saying \"no change needed\" is different from saying\n * \"the change is a no-op prefix\", and only the first leaves the existing\n * behaviour untouched for every project that already worked.\n */\nexport function commitPathsFor(\n schemaDir: string,\n repositoryRoot: string\n): Partial<SchemaCommitPaths> | undefined {\n const projectRoot = findProjectRoot(schemaDir);\n if (!projectRoot) return undefined;\n\n const prefix = path.relative(path.resolve(repositoryRoot), projectRoot);\n // Empty when the project is the repository — the case the defaults were\n // written for. `..` means the project sits *outside* the repository, which\n // is not a layout this can commit for; leaving the defaults alone lets the\n // repository's own write guard refuse it by path rather than inventing one.\n if (prefix === \"\" || prefix.startsWith(\"..\")) return undefined;\n\n const relocate = (p: string) => path.posix.join(...prefix.split(path.sep), p);\n return { schemaFile: relocate(DEFAULT_COMMIT_PATHS.schemaFile) };\n}\n\n/**\n * Does this project keep versioned migrations?\n *\n * It matters because live schema editing does not write one, and cannot: a\n * migration is Atlas's format with an integrity file, minted by an external\n * binary against a throwaway database. A server process has neither.\n *\n * What it *does* write is the schema source, which is exactly what\n * `rebase db generate` renders its desired state from — so the migration is\n * one command away.\n * The hazard is nobody saying so. A project that deploys by replaying\n * migrations would build its next environment without this change, having been\n * told the change was applied.\n */\nexport function usesVersionedMigrations(schemaDir: string): boolean {\n const projectRoot = findProjectRoot(schemaDir);\n if (!projectRoot) return false;\n return MIGRATION_DIRS.some(relative => holdsMigrations(path.join(projectRoot, relative)));\n}\n\n/**\n * Where a project's migrations can be, project-relative.\n *\n * The driver writes `drizzle/migrations/` relative to the directory it runs in,\n * and every `rebase db` subcommand runs it from the backend, which the CLI takes\n * to be `backend/` — so that is where a scaffolded project keeps them. Looking\n * only at the project root answered \"no migrations\" for every one of those, and\n * the warning this feeds never appeared. The root stays on the list because the\n * driver run from there writes there.\n */\nconst MIGRATION_DIRS = [\n path.join(\"backend\", \"drizzle\", \"migrations\"),\n path.join(\"drizzle\", \"migrations\")\n];\n\nfunction holdsMigrations(dir: string): boolean {\n try {\n return fs.existsSync(dir) && fs.readdirSync(dir).some(f => f.endsWith(\".sql\"));\n } catch {\n // Unreadable is not \"absent\": staying quiet about a project that may\n // replay migrations is the failure this exists to prevent.\n return true;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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../src/schema-edit/project-root.ts"],"sourcesContent":["/**\n * Where a project's generated artifacts belong, relative to its repository.\n *\n * `DEFAULT_COMMIT_PATHS` names `backend/src/schema.generated.ts`, which is\n * correct read from the **project** root and wrong read from anywhere else. The repository resolves what it is\n * given against its own root, and those two coincide only when the project is\n * the whole repository.\n *\n * A `rebase init` project is exactly that, so this was invisible. A project in\n * a subdirectory — an app inside a monorepo, this repository's own `app/` —\n * is not: the commit created `backend/` beside `.git`, left the real generated\n * file untouched, and committed a source change alongside a\n * stale schema. That is the failure the commit-the-whole-change design exists\n * to prevent, arriving through the design itself.\n *\n * ## Why `rebase.json`\n *\n * Because the codebase already treats it as the project marker: it is the file\n * the CLI validates as the manifest and the file `rebase resources --write`\n * writes `rebase.resources.json` beside. Using the same anchor means one answer\n * to \"where does this project start\", not two that can disagree.\n */\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { DEFAULT_COMMIT_PATHS, type SchemaCommitPaths } from \"@rebasepro/types\";\n\n/**\n * The nearest ancestor of `startDir` holding a `rebase.json`.\n *\n * Bounded: an unbounded walk from a misconfigured path climbs to the filesystem\n * root and reads whatever it finds there. `undefined` when there is none, which\n * is a project that predates the file — the caller then keeps the historical\n * behaviour rather than guessing.\n */\n/**\n * Where a scaffolded project keeps its schema source, project-relative.\n *\n * A bundle's tables are compiled output, so nothing on the running machine\n * points at this. A deployment committing to a repository states it, and this\n * is the default it states nothing against.\n */\nexport const DEFAULT_SCHEMA_PATH = \"backend/schema\";\n\nexport function findProjectRoot(startDir: string, levels = 5): string | undefined {\n let dir = path.resolve(startDir);\n for (let i = 0; i <= levels; i++) {\n if (fs.existsSync(path.join(dir, \"rebase.json\"))) return dir;\n const parent = path.dirname(dir);\n if (parent === dir) return undefined;\n dir = parent;\n }\n return undefined;\n}\n\n/**\n * The generated-artifact paths for a project, expressed relative to the\n * repository that will hold the commit.\n *\n * Returns `undefined` when there is nothing to correct — no project marker, or\n * a project that *is* the repository — so the caller passes no override and the\n * defaults stand. Saying \"no change needed\" is different from saying\n * \"the change is a no-op prefix\", and only the first leaves the existing\n * behaviour untouched for every project that already worked.\n */\nexport function commitPathsFor(\n schemaDir: string,\n repositoryRoot: string\n): Partial<SchemaCommitPaths> | undefined {\n const projectRoot = findProjectRoot(schemaDir);\n if (!projectRoot) return undefined;\n\n const prefix = path.relative(path.resolve(repositoryRoot), projectRoot);\n // Empty when the project is the repository — the case the defaults were\n // written for. `..` means the project sits *outside* the repository, which\n // is not a layout this can commit for; leaving the defaults alone lets the\n // repository's own write guard refuse it by path rather than inventing one.\n if (prefix === \"\" || prefix.startsWith(\"..\")) return undefined;\n\n const relocate = (p: string) => path.posix.join(...prefix.split(path.sep), p);\n return { schemaFile: relocate(DEFAULT_COMMIT_PATHS.schemaFile) };\n}\n\n/**\n * Does this project keep versioned migrations?\n *\n * It matters because live schema editing does not write one, and cannot: a\n * migration is Atlas's format with an integrity file, minted by an external\n * binary against a throwaway database. A server process has neither.\n *\n * What it *does* write is the schema source, which is exactly what\n * `rebase db generate` renders its desired state from — so the migration is\n * one command away.\n * The hazard is nobody saying so. A project that deploys by replaying\n * migrations would build its next environment without this change, having been\n * told the change was applied.\n */\nexport function usesVersionedMigrations(schemaDir: string): boolean {\n const projectRoot = findProjectRoot(schemaDir);\n if (!projectRoot) return false;\n return MIGRATION_DIRS.some(relative => holdsMigrations(path.join(projectRoot, relative)));\n}\n\n/**\n * Where a project's migrations can be, project-relative.\n *\n * The driver writes `drizzle/migrations/` relative to the directory it runs in,\n * and every `rebase db` subcommand runs it from the backend, which the CLI takes\n * to be `backend/` — so that is where a scaffolded project keeps them. Looking\n * only at the project root answered \"no migrations\" for every one of those, and\n * the warning this feeds never appeared. The root stays on the list because the\n * driver run from there writes there.\n */\nconst MIGRATION_DIRS = [\n path.join(\"backend\", \"drizzle\", \"migrations\"),\n path.join(\"drizzle\", \"migrations\")\n];\n\nfunction holdsMigrations(dir: string): boolean {\n try {\n return fs.existsSync(dir) && fs.readdirSync(dir).some(f => f.endsWith(\".sql\"));\n } catch {\n // Unreadable is not \"absent\": staying quiet about a project that may\n // replay migrations is the failure this exists to prevent.\n return true;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAa,sBAAsB;AAEnC,SAAgB,gBAAgB,UAAkB,SAAS,GAAuB;CAC9E,IAAI,MAAM,KAAK,QAAQ,QAAQ;CAC/B,KAAK,IAAI,IAAI,GAAG,KAAK,QAAQ,KAAK;EAC9B,IAAI,GAAG,WAAW,KAAK,KAAK,KAAK,aAAa,CAAC,GAAG,OAAO;EACzD,MAAM,SAAS,KAAK,QAAQ,GAAG;EAC/B,IAAI,WAAW,KAAK,OAAO,KAAA;EAC3B,MAAM;CACV;AAEJ;;;;;;;;;;;AAYA,SAAgB,eACZ,WACA,gBACsC;CACtC,MAAM,cAAc,gBAAgB,SAAS;CAC7C,IAAI,CAAC,aAAa,OAAO,KAAA;CAEzB,MAAM,SAAS,KAAK,SAAS,KAAK,QAAQ,cAAc,GAAG,WAAW;CAKtE,IAAI,WAAW,MAAM,OAAO,WAAW,IAAI,GAAG,OAAO,KAAA;CAErD,MAAM,YAAY,MAAc,KAAK,MAAM,KAAK,GAAG,OAAO,MAAM,KAAK,GAAG,GAAG,CAAC;CAC5E,OAAO,EAAE,YAAY,SAAS,qBAAqB,UAAU,EAAE;AACnE;;;;;;;;;;;;;;;AAgBA,SAAgB,wBAAwB,WAA4B;CAChE,MAAM,cAAc,gBAAgB,SAAS;CAC7C,IAAI,CAAC,aAAa,OAAO;CACzB,OAAO,eAAe,MAAK,aAAY,gBAAgB,KAAK,KAAK,aAAa,QAAQ,CAAC,CAAC;AAC5F;;;;;;;;;;;AAYA,IAAM,iBAAiB,CACnB,KAAK,KAAK,WAAW,WAAW,YAAY,GAC5C,KAAK,KAAK,WAAW,YAAY,CACrC;AAEA,SAAS,gBAAgB,KAAsB;CAC3C,IAAI;EACA,OAAO,GAAG,WAAW,GAAG,KAAK,GAAG,YAAY,GAAG,CAAC,CAAC,MAAK,MAAK,EAAE,SAAS,MAAM,CAAC;CACjF,QAAQ;EAGJ,OAAO;CACX;AACJ"}
@@ -2,7 +2,7 @@ import { createRequire as __rebaseCreateRequire } from "module";
2
2
  import __rebaseProcess from "process";
3
3
  globalThis.process ??= __rebaseProcess;
4
4
  __rebaseCreateRequire(import.meta.url);
5
- import { Rn as __exportAll } from "./src-BdPKCs9u.js";
5
+ import { zn as __exportAll } from "./src--EBfCtYm.js";
6
6
  import { a as logger } from "./logger-SigQ2oZJ.js";
7
7
  import { i as errorHandler, t as ApiError } from "./errors-NVbAQU25.js";
8
8
  import { Hono } from "hono";
@@ -138,4 +138,4 @@ function socketAddress(c) {
138
138
  //#endregion
139
139
  export { proxy_exports as t };
140
140
 
141
- //# sourceMappingURL=proxy-DUUXXoQo.js.map
141
+ //# sourceMappingURL=proxy-0fGXJapt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy-DUUXXoQo.js","names":[],"sources":["../src/functions/proxy.ts"],"sourcesContent":["/**\n * Forwarding `/api/functions/*` to the process that serves it.\n *\n * A split deployment normally puts a reverse proxy in front and routes the path\n * there. This exists so it does not have to: set `REBASE_FUNCTIONS_UPSTREAM` on\n * the API process and the two-container topology presents the identical URL\n * surface as the one-container one, with nothing new to install and nothing for\n * a client or an SDK to know about.\n *\n * It is a transport hop, not a trust boundary. Nothing is authenticated or\n * authorised here: the upstream runs the same auth middleware against the same\n * `JWT_SECRET` and must see the original `Authorization` header, so re-deciding\n * anything on the way through would put two answers where the system has one.\n */\nimport { Hono, type Context } from \"hono\";\nimport { getConnInfo } from \"@hono/node-server/conninfo\";\nimport type { HonoEnv } from \"../api/types\";\nimport { ApiError, errorHandler } from \"../api/errors\";\nimport { logger } from \"../utils/logger\";\n\n/**\n * Headers that describe *this* connection rather than the request, and so must\n * not be copied onto a new one.\n *\n * `host` is the important one: forwarded unchanged it names the API process, and\n * an upstream doing any virtual-host routing would answer for the wrong service.\n * `content-length` and `transfer-encoding` are recomputed by `fetch` from the\n * body it is actually given, and a stale value is a hang or a truncation.\n */\nconst HOP_BY_HOP = new Set([\n \"connection\",\n \"keep-alive\",\n \"proxy-authenticate\",\n \"proxy-authorization\",\n \"te\",\n \"trailer\",\n \"transfer-encoding\",\n \"upgrade\",\n \"host\",\n \"content-length\"\n]);\n\n/**\n * Additionally dropped from the *response*, because `fetch` has already acted on\n * them by the time we see the body.\n *\n * `Content-Encoding` is the one that matters and the one that is easy to miss:\n * undici decompresses a `gzip` response transparently, but leaves the header on\n * the `Response` object. Copy it onto the body we hand back and the client is\n * told to gunzip bytes that are already plain — which does not fail cleanly. It\n * hangs, or it surfaces as a decode error several layers away from the proxy\n * that caused it. (This is not hypothetical: the runtime compresses its own\n * responses, so *every* forwarded response carries the header.)\n */\nconst RESPONSE_ONLY_DROP = new Set([\"content-encoding\", \"content-length\"]);\n\nexport interface FunctionsProxyOptions {\n /** Base URL of the process serving the functions, e.g. `http://functions:8080`. */\n upstream: string;\n /**\n * The mount path being forwarded, e.g. `/api/functions`. Omitted, it is the\n * `mountPath` the functions group recorded for the request — the path the\n * application mounted it at — so the upstream is asked for the same path.\n */\n basePath?: string;\n}\n\n/**\n * A router that forwards everything under its mount point to `upstream`.\n *\n * Method, path, query string, body and headers travel verbatim, with two\n * deliberate exceptions:\n *\n * 1. Hop-by-hop headers are dropped ({@link HOP_BY_HOP}).\n * 2. `X-Forwarded-For` gains the address this process saw the request come from.\n * This is not decoration — the upstream's rate limiters and the auth routes'\n * IP logging read that chain, and without the append every forwarded request\n * arrives from one address: the API pod's. Every caller would share a single\n * rate-limit bucket and every login would be logged from the same IP.\n *\n * **The upstream must therefore count one more proxy hop than the API process\n * does.** `TRUSTED_PROXY_HOPS` on the functions process is the API's value\n * plus one. Left unset it defaults to 0, and the upstream falls back to the\n * socket address — again, the API pod's — which is safe but useless.\n */\nexport function createFunctionsProxy(options: FunctionsProxyOptions): Hono<HonoEnv> {\n const router = new Hono<HonoEnv>();\n // Trailing slash trimmed once, here: joining it per request is how a proxy\n // ends up asking for `//functions/x`, which some servers route and some 404.\n const upstream = options.upstream.replace(/\\/+$/, \"\");\n\n router.all(\"/*\", async (c) => {\n const incoming = new URL(c.req.url);\n const basePath = options.basePath ?? c.get(\"mountPath\") ?? \"\";\n // The path *below* the mount point. Hono gives the full request path, so\n // taking the suffix is what keeps the upstream's own mount identical:\n // `/api/functions/send-invoice` here becomes `/api/functions/send-invoice`\n // there, not `/api/functions/api/functions/send-invoice`.\n const suffix = incoming.pathname.startsWith(basePath)\n ? incoming.pathname.slice(basePath.length)\n : incoming.pathname;\n const target = `${upstream}${basePath}${suffix}${incoming.search}`;\n\n const headers = new Headers();\n for (const [name, value] of c.req.raw.headers) {\n if (!HOP_BY_HOP.has(name.toLowerCase())) headers.set(name, value);\n }\n\n const seenFrom = socketAddress(c);\n if (seenFrom) {\n const chain = c.req.header(\"x-forwarded-for\");\n headers.set(\"x-forwarded-for\", chain ? `${chain}, ${seenFrom}` : seenFrom);\n }\n\n try {\n const response = await fetch(target, {\n method: c.req.method,\n headers,\n // GET and HEAD may not carry one; everything else streams\n // through rather than being buffered, so a large upload does not\n // have to fit in this process's memory on its way past.\n body: c.req.method === \"GET\" || c.req.method === \"HEAD\" ? undefined : c.req.raw.body,\n // Required by undici whenever the body is a stream. Without it\n // the fetch rejects with a message about duplex that says\n // nothing about what to do.\n duplex: \"half\",\n redirect: \"manual\"\n } as RequestInit);\n\n return new Response(response.body, {\n status: response.status,\n statusText: response.statusText,\n headers: responseHeaders(response.headers)\n });\n } catch (err) {\n // The upstream being down is an infrastructure fact, not a bug in\n // the caller's request, and 502 is the one status that says so.\n // Named explicitly in the body because the alternative — a generic\n // 500 from the API process — sends people reading the wrong logs.\n logger.error(\"Functions upstream unreachable\", {\n upstream,\n path: incoming.pathname,\n error: err instanceof Error ? err : new Error(String(err))\n });\n // Through the error handler, so it is the envelope every other\n // failure answers — with the request id that ties it to the line\n // above. Built by hand, it carried none.\n return errorHandler(new ApiError(\n 502,\n \"FUNCTIONS_UPSTREAM_UNREACHABLE\",\n \"The process serving custom functions could not be reached from this one.\"\n ), c);\n }\n });\n\n return router;\n}\n\n/**\n * Response headers, minus the ones that describe the upstream's connection and\n * the ones `fetch` has already consumed on our behalf.\n */\nfunction responseHeaders(headers: Headers): Headers {\n const out = new Headers();\n for (const [name, value] of headers) {\n const lower = name.toLowerCase();\n if (HOP_BY_HOP.has(lower) || RESPONSE_ONLY_DROP.has(lower)) continue;\n // `append`, not `set`: iterating a `Headers` yields each `Set-Cookie`\n // on its own, and `set` overwrote every one with the next — a sign-in\n // setting a session and a CSRF cookie reached the browser with the\n // CSRF cookie only. Every other header arrives folded, once.\n out.append(name, value);\n }\n return out;\n}\n\n/** The address this process saw, or undefined on a runtime that cannot say. */\nfunction socketAddress(c: Context<HonoEnv>): string | undefined {\n try {\n return getConnInfo(c).remote.address;\n } catch {\n return undefined;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAM,6BAAa,IAAI,IAAI;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ,CAAC;;;;;;;;;;;;;AAcD,IAAM,qCAAqB,IAAI,IAAI,CAAC,oBAAoB,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;AA+BzE,SAAgB,qBAAqB,SAA+C;CAChF,MAAM,SAAS,IAAI,KAAc;CAGjC,MAAM,WAAW,QAAQ,SAAS,QAAQ,QAAQ,EAAE;CAEpD,OAAO,IAAI,MAAM,OAAO,MAAM;EAC1B,MAAM,WAAW,IAAI,IAAI,EAAE,IAAI,GAAG;EAClC,MAAM,WAAW,QAAQ,YAAY,EAAE,IAAI,WAAW,KAAK;EAK3D,MAAM,SAAS,SAAS,SAAS,WAAW,QAAQ,IAC9C,SAAS,SAAS,MAAM,SAAS,MAAM,IACvC,SAAS;EACf,MAAM,SAAS,GAAG,WAAW,WAAW,SAAS,SAAS;EAE1D,MAAM,U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J;CACJ;AACJ"}
1
+ {"version":3,"file":"proxy-0fGXJapt.js","names":[],"sources":["../src/functions/proxy.ts"],"sourcesContent":["/**\n * Forwarding `/api/functions/*` to the process that serves it.\n *\n * A split deployment normally puts a reverse proxy in front and routes the path\n * there. This exists so it does not have to: set `REBASE_FUNCTIONS_UPSTREAM` on\n * the API process and the two-container topology presents the identical URL\n * surface as the one-container one, with nothing new to install and nothing for\n * a client or an SDK to know about.\n *\n * It is a transport hop, not a trust boundary. Nothing is authenticated or\n * authorised here: the upstream runs the same auth middleware against the same\n * `JWT_SECRET` and must see the original `Authorization` header, so re-deciding\n * anything on the way through would put two answers where the system has one.\n */\nimport { Hono, type Context } from \"hono\";\nimport { getConnInfo } from \"@hono/node-server/conninfo\";\nimport type { HonoEnv } from \"../api/types\";\nimport { ApiError, errorHandler } from \"../api/errors\";\nimport { logger } from \"../utils/logger\";\n\n/**\n * Headers that describe *this* connection rather than the request, and so must\n * not be copied onto a new one.\n *\n * `host` is the important one: forwarded unchanged it names the API process, and\n * an upstream doing any virtual-host routing would answer for the wrong service.\n * `content-length` and `transfer-encoding` are recomputed by `fetch` from the\n * body it is actually given, and a stale value is a hang or a truncation.\n */\nconst HOP_BY_HOP = new Set([\n \"connection\",\n \"keep-alive\",\n \"proxy-authenticate\",\n \"proxy-authorization\",\n \"te\",\n \"trailer\",\n \"transfer-encoding\",\n \"upgrade\",\n \"host\",\n \"content-length\"\n]);\n\n/**\n * Additionally dropped from the *response*, because `fetch` has already acted on\n * them by the time we see the body.\n *\n * `Content-Encoding` is the one that matters and the one that is easy to miss:\n * undici decompresses a `gzip` response transparently, but leaves the header on\n * the `Response` object. Copy it onto the body we hand back and the client is\n * told to gunzip bytes that are already plain — which does not fail cleanly. It\n * hangs, or it surfaces as a decode error several layers away from the proxy\n * that caused it. (This is not hypothetical: the runtime compresses its own\n * responses, so *every* forwarded response carries the header.)\n */\nconst RESPONSE_ONLY_DROP = new Set([\"content-encoding\", \"content-length\"]);\n\nexport interface FunctionsProxyOptions {\n /** Base URL of the process serving the functions, e.g. `http://functions:8080`. */\n upstream: string;\n /**\n * The mount path being forwarded, e.g. `/api/functions`. Omitted, it is the\n * `mountPath` the functions group recorded for the request — the path the\n * application mounted it at — so the upstream is asked for the same path.\n */\n basePath?: string;\n}\n\n/**\n * A router that forwards everything under its mount point to `upstream`.\n *\n * Method, path, query string, body and headers travel verbatim, with two\n * deliberate exceptions:\n *\n * 1. Hop-by-hop headers are dropped ({@link HOP_BY_HOP}).\n * 2. `X-Forwarded-For` gains the address this process saw the request come from.\n * This is not decoration — the upstream's rate limiters and the auth routes'\n * IP logging read that chain, and without the append every forwarded request\n * arrives from one address: the API pod's. Every caller would share a single\n * rate-limit bucket and every login would be logged from the same IP.\n *\n * **The upstream must therefore count one more proxy hop than the API process\n * does.** `TRUSTED_PROXY_HOPS` on the functions process is the API's value\n * plus one. Left unset it defaults to 0, and the upstream falls back to the\n * socket address — again, the API pod's — which is safe but useless.\n */\nexport function createFunctionsProxy(options: FunctionsProxyOptions): Hono<HonoEnv> {\n const router = new Hono<HonoEnv>();\n // Trailing slash trimmed once, here: joining it per request is how a proxy\n // ends up asking for `//functions/x`, which some servers route and some 404.\n const upstream = options.upstream.replace(/\\/+$/, \"\");\n\n router.all(\"/*\", async (c) => {\n const incoming = new URL(c.req.url);\n const basePath = options.basePath ?? c.get(\"mountPath\") ?? \"\";\n // The path *below* the mount point. Hono gives the full request path, so\n // taking the suffix is what keeps the upstream's own mount identical:\n // `/api/functions/send-invoice` here becomes `/api/functions/send-invoice`\n // there, not `/api/functions/api/functions/send-invoice`.\n const suffix = incoming.pathname.startsWith(basePath)\n ? incoming.pathname.slice(basePath.length)\n : incoming.pathname;\n const target = `${upstream}${basePath}${suffix}${incoming.search}`;\n\n const headers = new Headers();\n for (const [name, value] of c.req.raw.headers) {\n if (!HOP_BY_HOP.has(name.toLowerCase())) headers.set(name, value);\n }\n\n const seenFrom = socketAddress(c);\n if (seenFrom) {\n const chain = c.req.header(\"x-forwarded-for\");\n headers.set(\"x-forwarded-for\", chain ? `${chain}, ${seenFrom}` : seenFrom);\n }\n\n try {\n const response = await fetch(target, {\n method: c.req.method,\n headers,\n // GET and HEAD may not carry one; everything else streams\n // through rather than being buffered, so a large upload does not\n // have to fit in this process's memory on its way past.\n body: c.req.method === \"GET\" || c.req.method === \"HEAD\" ? undefined : c.req.raw.body,\n // Required by undici whenever the body is a stream. Without it\n // the fetch rejects with a message about duplex that says\n // nothing about what to do.\n duplex: \"half\",\n redirect: \"manual\"\n } as RequestInit);\n\n return new Response(response.body, {\n status: response.status,\n statusText: response.statusText,\n headers: responseHeaders(response.headers)\n });\n } catch (err) {\n // The upstream being down is an infrastructure fact, not a bug in\n // the caller's request, and 502 is the one status that says so.\n // Named explicitly in the body because the alternative — a generic\n // 500 from the API process — sends people reading the wrong logs.\n logger.error(\"Functions upstream unreachable\", {\n upstream,\n path: incoming.pathname,\n error: err instanceof Error ? err : new Error(String(err))\n });\n // Through the error handler, so it is the envelope every other\n // failure answers — with the request id that ties it to the line\n // above. Built by hand, it carried none.\n return errorHandler(new ApiError(\n 502,\n \"FUNCTIONS_UPSTREAM_UNREACHABLE\",\n \"The process serving custom functions could not be reached from this one.\"\n ), c);\n }\n });\n\n return router;\n}\n\n/**\n * Response headers, minus the ones that describe the upstream's connection and\n * the ones `fetch` has already consumed on our behalf.\n */\nfunction responseHeaders(headers: Headers): Headers {\n const out = new Headers();\n for (const [name, value] of headers) {\n const lower = name.toLowerCase();\n if (HOP_BY_HOP.has(lower) || RESPONSE_ONLY_DROP.has(lower)) continue;\n // `append`, not `set`: iterating a `Headers` yields each `Set-Cookie`\n // on its own, and `set` overwrote every one with the next — a sign-in\n // setting a session and a CSRF cookie reached the browser with the\n // CSRF cookie only. Every other header arrives folded, once.\n out.append(name, value);\n }\n return out;\n}\n\n/** The address this process saw, or undefined on a runtime that cannot say. */\nfunction socketAddress(c: Context<HonoEnv>): string | undefined {\n try {\n return getConnInfo(c).remote.address;\n } cat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AAM;IAC/B,QAAQ,SAAS;IACjB,YAAY,SAAS;IACrB,SAAS,gBAAgB,SAAS,OAAO;GAC7C,CAAC;EACL,SAAS,KAAK;GAKV,OAAO,MAAM,kCAAkC;IAC3C;IACA,MAAM,SAAS;IACf,OAAO,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC;GAC7D,CAAC;GAID,OAAO,aAAa,IAAI,SACpB,KACA,kCACA,0EACJ,GAAG,CAAC;EACR;CACJ,CAAC;CAED,OAAO;AACX;;;;;AAMA,SAAS,gBAAgB,SAA2B;CAChD,MAAM,MAAM,IAAI,QAAQ;CACxB,KAAK,MAAM,CAAC,MAAM,UAAU,SAAS;EACjC,MAAM,QAAQ,KAAK,YAAY;EAC/B,IAAI,WAAW,IAAI,KAAK,KAAK,mBAAmB,IAAI,KAAK,GAAG;EAK5D,IAAI,OAAO,MAAM,KAAK;CAC1B;CACA,OAAO;AACX;;AAGA,SAAS,cAAc,GAAyC;CAC5D,IAAI;EACA,OAAO,YAAY,CAAC,CAAC,CAAC,OAAO;CACjC,QAAQ;EACJ;CACJ;AACJ"}
@@ -2,9 +2,9 @@ import { createRequire as __rebaseCreateRequire } from "module";
2
2
  import __rebaseProcess from "process";
3
3
  globalThis.process ??= __rebaseProcess;
4
4
  __rebaseCreateRequire(import.meta.url);
5
- import { A as isTimeZoneName, An as parseRelationAggregateSort, B as resolveClientListLimit, D as aggregateAlias, E as FIELDLESS_AGGREGATES, O as aggregateGroupKey, R as ListLimitError, T as AGGREGATE_GROUP_TRANSFORMS, k as isPercentileFraction, kn as parseCaseFoldedFieldPath, w as AGGREGATE_FUNCTIONS } from "./src-BdPKCs9u.js";
5
+ import { A as isTimeZoneName, An as parseCaseFoldedFieldPath, B as resolveClientListLimit, D as aggregateAlias, E as FIELDLESS_AGGREGATES, O as aggregateGroupKey, R as ListLimitError, T as AGGREGATE_GROUP_TRANSFORMS, jn as parseRelationAggregateSort, k as isPercentileFraction, w as AGGREGATE_FUNCTIONS } from "./src--EBfCtYm.js";
6
6
  import { n as apiHiddenKeys, t as UNSERVED_TABLE, u as restrictedKeys } from "./access-D1CTJSLK.js";
7
- import { d as IncludeSpecError, f as deserializeInclude, g as OrderBySpecError, i as deserializeLogicalCondition, m as normalizeInclude, n as UnknownFilterOperatorError, r as deserializeFilter, s as PAGE_WITH_OFFSET_MESSAGE, t as RESERVED_QUERY_KEYS } from "./filter-dialect-nsQ2ozPY.js";
7
+ import { d as IncludeSpecError, f as deserializeInclude, g as OrderBySpecError, i as deserializeLogicalCondition, m as normalizeInclude, n as UnknownFilterOperatorError, r as deserializeFilter, s as PAGE_WITH_OFFSET_MESSAGE, t as RESERVED_QUERY_KEYS } from "./filter-dialect-DgWkoXt7.js";
8
8
  import { t as ApiError } from "./errors-NVbAQU25.js";
9
9
  import { i as parseWithDeleted, t as DELETED_QUERY_PARAM } from "./soft-delete-params-Dhn0qKFv.js";
10
10
  //#region ../common/src/collections/unknown-field.ts
@@ -1211,4 +1211,4 @@ function parseQueryOptions(query, limits = {}, access) {
1211
1211
  //#endregion
1212
1212
  export { parseWriteFilter as a, assertQueryFieldsReadable as c, relationOf as d, relationsOfKind as f, reconcileCursorOrder as h, parseQueryOptions as i, assertReadableFields as l, decodeCursor as m, parseAggregateSelect as n, resolveListLimitParam as o, cursorToStartAfter as p, parseGroupBy as r, assertNoHiddenAggregateNames as s, orderByEntriesToTuples as t, requestViewer as u };
1213
1213
 
1214
- //# sourceMappingURL=query-parser-C9l1eFov.js.map
1214
+ //# sourceMappingURL=query-parser-DwERE0rm.js.map