@terreno/admin-backend 0.26.0 → 0.27.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/adminApp.js CHANGED
@@ -939,6 +939,7 @@ var AdminApp = /** @class */ (function () {
939
939
  }); },
940
940
  }
941
941
  : {};
942
+ // noExplicitAny: matches the Model<any> from AdminModelConfig above.
942
943
  // biome-ignore lint/suspicious/noExplicitAny: matches the Model<any> from AdminModelConfig above.
943
944
  var routerOptions = __assign(__assign(__assign(__assign(__assign(__assign({}, (openApiMw ? { openApi: openApiMw } : {})), { defaultLimit: (_j = config.pageSize) !== null && _j !== void 0 ? _j : 100, maxLimit: 500, permissions: {
944
945
  create: adminPermission((_k = config.permissions) === null || _k === void 0 ? void 0 : _k.create),
@@ -219,6 +219,7 @@ var DocumentStorageApp = /** @class */ (function () {
219
219
  }); })], false));
220
220
  // POST basePath/ — Upload a file
221
221
  app.post.apply(app, __spreadArray(__spreadArray(["".concat(basePath, "/")], __read(adminGuard), false), [
222
+ // noExplicitAny: multer's RequestHandler type is incompatible with Express 5's middleware signature.
222
223
  // biome-ignore lint/suspicious/noExplicitAny: multer's RequestHandler type is incompatible with Express 5's middleware signature.
223
224
  upload.single("file"),
224
225
  (0, api_1.asyncHandler)(function (req, res) { return __awaiter(_this, void 0, void 0, function () {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "dependencies": {
7
7
  "@google-cloud/storage": "^7.15.0",
8
- "@terreno/api": "0.26.0",
8
+ "@terreno/api": "0.27.0",
9
9
  "express": "^5.2.1",
10
10
  "luxon": "^3.7.2",
11
11
  "multer": "2.2.0"
@@ -13,7 +13,7 @@
13
13
  "description": "Admin panel backend plugin for @terreno/api",
14
14
  "devDependencies": {
15
15
  "@biomejs/biome": "^2.3.6",
16
- "@terreno/test": "0.26.0",
16
+ "@terreno/test": "0.27.0",
17
17
  "@types/bun": "^1.3.8",
18
18
  "@types/express": "^5.0.6",
19
19
  "@types/luxon": "^3.7.1",
@@ -54,5 +54,5 @@
54
54
  "test:coverage": "bun run ../scripts/check-coverage.ts"
55
55
  },
56
56
  "types": "dist/index.d.ts",
57
- "version": "0.26.0"
57
+ "version": "0.27.0"
58
58
  }
package/src/adminApp.ts CHANGED
@@ -54,6 +54,7 @@ export interface AdminFieldOverride {
54
54
 
55
55
  export interface AdminModelConfig {
56
56
  /** The Mongoose model to expose in the admin panel */
57
+ // noExplicitAny: Model<T> is invariant; the admin panel must accept any document shape.
57
58
  // biome-ignore lint/suspicious/noExplicitAny: Model<T> is invariant; the admin panel must accept any document shape.
58
59
  model: Model<any>;
59
60
  /** Route path for this model's endpoints, relative to basePath (e.g., "/users") */
@@ -983,6 +984,7 @@ export class AdminApp {
983
984
  }
984
985
  : {};
985
986
 
987
+ // noExplicitAny: matches the Model<any> from AdminModelConfig above.
986
988
  // biome-ignore lint/suspicious/noExplicitAny: matches the Model<any> from AdminModelConfig above.
987
989
  const routerOptions: ModelRouterOptions<any> = {
988
990
  ...(openApiMw ? {openApi: openApiMw} : {}),
@@ -179,6 +179,7 @@ export class DocumentStorageApp {
179
179
  app.post(
180
180
  `${basePath}/`,
181
181
  ...adminGuard,
182
+ // noExplicitAny: multer's RequestHandler type is incompatible with Express 5's middleware signature.
182
183
  // biome-ignore lint/suspicious/noExplicitAny: multer's RequestHandler type is incompatible with Express 5's middleware signature.
183
184
  upload.single("file") as any,
184
185
  asyncHandler(async (req: express.Request, res: express.Response) => {