@rebasepro/server 0.32.0 → 0.33.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.
package/dist/index.es.js CHANGED
@@ -13,7 +13,7 @@ import "./resumable-upload-threshold-CKv-Ry0l.js";
13
13
  import { a as revokeInternalTableSql, n as REBASE_INTERNAL_TABLES, t as LOAD_REQUEST_ROLES_PLPGSQL } from "./internal-tables-XxM_NdR_.js";
14
14
  import { a as warnDeprecated, n as FilesFailedToLoadError } from "./dynamic-import-Bi3XK5y-.js";
15
15
  import { i as canReadColumn, n as apiHiddenKeys, o as canWriteColumn, s as canWriteRelation, u as restrictedKeys } from "./access-D1CTJSLK.js";
16
- import { a as loadBackendSchema, d as isSchemaDefinitionError, i as isSchemaLoadError, n as compileLoadedSchema, r as compileSchemaDefs, t as SchemaLoadError } from "./load-schema-B4Nv1mwq.js";
16
+ import { a as loadBackendSchema, d as isSchemaDefinitionError, i as isSchemaLoadError, n as compileLoadedSchema, r as compileSchemaDefs, t as SchemaLoadError } from "./load-schema-CSEXeduP.js";
17
17
  import { a as parseWriteFilter, c as assertQueryFieldsReadable, d as relationOf, f as relationsOfKind, h as reconcileCursorOrder, i as parseQueryOptions, l as assertReadableFields, m as decodeCursor$1, n as parseAggregateSelect, o as resolveListLimitParam, p as cursorToStartAfter, r as parseGroupBy, s as assertNoHiddenAggregateNames, t as orderByEntriesToTuples, u as requestViewer } from "./query-parser-Cd70kZO8.js";
18
18
  import { _ as normalizeOrderBy, c as collectAllPages, g as OrderBySpecError, l as paginateFind, m as normalizeInclude, p as mergeIncludeSpecs, r as deserializeFilter, t as RESERVED_QUERY_KEYS, u as resolveFindWindow, v as serializeOrderBy } from "./filter-dialect-XtPJOCbD.js";
19
19
  import { C as randomHex, E as sha256Hex, S as constantTimeEqual, T as sha256Bytes, b as normalizePemFromEnv, d as hasAsymmetricSigningKey, g as setDefaultJwtService, h as processJwtService, l as getJwks, m as jwtOf, n as configureJwt, r as createJwtService, y as verifyJwt } from "./jwt-CqhXs8Iz.js";
@@ -30292,11 +30292,11 @@ async function buildRebaseBackend(options, announcements) {
30292
30292
  let schemaEditorOff = schemaEditorUnavailable();
30293
30293
  let schemaEditorRoutes;
30294
30294
  let tableSourceEditor;
30295
- const loadTableSourceEditor = (dir) => tableSourceEditor ??= import("./schema-editor-routes-DEGwyQmx.js").then((module) => module.createTableSourceEditor(dir));
30295
+ const loadTableSourceEditor = (dir) => tableSourceEditor ??= import("./schema-editor-routes-BxN0Q85n.js").then((module) => module.createTableSourceEditor(dir));
30296
30296
  const tsMorphMissing = (err) => typeof err === "object" && err !== null && "code" in err && err.code === "ERR_MODULE_NOT_FOUND";
30297
30297
  if (!schemaEditorOff && config.schemaDir) try {
30298
30298
  const editor = await loadTableSourceEditor(config.schemaDir);
30299
- schemaEditorRoutes = (await import("./schema-editor-routes-DEGwyQmx.js")).createSchemaEditorRoutes(editor, { getAdmin: () => defaultDriver.admin });
30299
+ schemaEditorRoutes = (await import("./schema-editor-routes-BxN0Q85n.js")).createSchemaEditorRoutes(editor, { getAdmin: () => defaultDriver.admin });
30300
30300
  } catch (err) {
30301
30301
  if (tsMorphMissing(err)) {
30302
30302
  schemaEditorOff = {
@@ -30351,7 +30351,7 @@ async function buildRebaseBackend(options, announcements) {
30351
30351
  let remoteEditingOff;
30352
30352
  if (remoteRepo) {
30353
30353
  try {
30354
- remoteEditor = await import("./table-source-editor-D_zNDhEU.js").then((n) => n.u);
30354
+ remoteEditor = await import("./table-source-editor-DCJgZEz9.js").then((n) => n.u);
30355
30355
  } catch (err) {
30356
30356
  if (err?.code !== "ERR_MODULE_NOT_FOUND") throw err;
30357
30357
  remoteEditingOff = {
@@ -2043,7 +2043,10 @@ async function loadBackendSchema(dir, options = {}) {
2043
2043
  if (options.projectRoot !== false) {
2044
2044
  const projectRoot = path$1.resolve(options.projectRoot ?? path$1.join(resolved, "..", ".."));
2045
2045
  const legacyDir = path$1.join(projectRoot, "config", "collections");
2046
- if (fs$1.existsSync(legacyDir) && fs$1.statSync(legacyDir).isDirectory()) throw legacyLayoutError(`The project still has ${legacyDir}`, legacyDir);
2046
+ if (fs$1.existsSync(legacyDir) && fs$1.statSync(legacyDir).isDirectory()) {
2047
+ if (INDEX_FILES.some((name) => fs$1.existsSync(path$1.join(resolved, name)))) throw new SchemaLoadError(`The project has ${resolved} and still has ${legacyDir}, which the migration leaves in place for \`rebase migrate collections-to-tables --check\`. Remove what Rebase used to read from config/ once you no longer need that check — \`git rm -r config/collections\`, and config/index.ts, config/resources.ts and config/storage.ts if the migration moved them — then run this again.`, legacyDir);
2048
+ throw legacyLayoutError(`The project still has ${legacyDir}`, legacyDir);
2049
+ }
2047
2050
  }
2048
2051
  if (!fs$1.existsSync(resolved)) return {
2049
2052
  dir: resolved,
@@ -2123,4 +2126,4 @@ function compileLoadedSchema(loaded) {
2123
2126
  //#endregion
2124
2127
  export { loadBackendSchema as a, deriveJunctionTable as c, isSchemaDefinitionError as d, isSchemaLoadError as i, deriveJunctionTargetKey as l, compileLoadedSchema as n, deriveBelongsToLocalKey as o, compileSchemaDefs as r, deriveJunctionSourceKey as s, SchemaLoadError as t, deriveTargetForeignKey as u };
2125
2128
 
2126
- //# sourceMappingURL=load-schema-B4Nv1mwq.js.map
2129
+ //# sourceMappingURL=load-schema-CSEXeduP.js.map