@dnax/core 0.21.3 → 0.22.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/app/hono.ts CHANGED
@@ -16,7 +16,7 @@ import { asyncLocalStorage, sessionStorage } from "../lib/asyncLocalStorage";
16
16
  import { localSession } from "../lib/session";
17
17
  import {
18
18
  cleanPath,
19
- contextError,
19
+ ContextError,
20
20
  jwt,
21
21
  fn,
22
22
  omit,
@@ -258,7 +258,7 @@ function HonoInstance(): typeof app {
258
258
  try {
259
259
  // control tenant
260
260
  if (!c.var["tenant-id"] || !getTenant(c.var["tenant-id"])) {
261
- throw new contextError(`Tenant Id missiong or not found`, 404);
261
+ throw new ContextError(`Tenant Id missiong or not found`, 404);
262
262
  }
263
263
 
264
264
  var response;
@@ -296,7 +296,7 @@ function HonoInstance(): typeof app {
296
296
 
297
297
  // Controlle action
298
298
  if (!getAction(action)) {
299
- throw new contextError(`Action ${action} not found`, 400);
299
+ throw new ContextError(`Action ${action} not found`, 400);
300
300
  }
301
301
 
302
302
  if (action == "execToolkit") {
@@ -327,7 +327,7 @@ function HonoInstance(): typeof app {
327
327
  }
328
328
 
329
329
  if (!getAction(action) || !collection) {
330
- throw new contextError(`Collection ${collection} not found`, 404);
330
+ throw new ContextError(`Collection ${collection} not found`, 404);
331
331
  }
332
332
 
333
333
  // if action and collection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.21.3",
3
+ "version": "0.22.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {
package/utils/index.ts CHANGED
@@ -360,6 +360,7 @@ const password = {
360
360
  verify: verifyHashPassword,
361
361
  };
362
362
 
363
+ const contextError = ContextError;
363
364
  export {
364
365
  dotJson,
365
366
  uuid,
@@ -380,6 +381,7 @@ export {
380
381
  resolvePath,
381
382
  isDate, // Check if date
382
383
  ContextError,
384
+ contextError,
383
385
  jwt, // Jwt utils
384
386
  _, // Moment utils
385
387
  generateUniqueId, // Generate unique id