@dnax/core 0.50.2 → 0.52.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
@@ -718,7 +718,7 @@ function HonoInstance(): typeof app {
718
718
  success: false,
719
719
  meta: err?.meta || {},
720
720
  };
721
- if (Cfg.api?.onError && typeof Cfg.api?.onError == "function") {
721
+ if (Cfg?.api?.onError && typeof Cfg.api?.onError == "function") {
722
722
  await Cfg.api?.onError(errorFormated).catch((err: any) => {});
723
723
  }
724
724
  return c.json(errorFormated);
package/config/index.ts CHANGED
@@ -40,6 +40,7 @@ async function setCfg(config: Config) {
40
40
  };
41
41
  Cfg.tenants = config?.tenants;
42
42
  Cfg.email = config?.email;
43
+ Cfg.api = config?.api || {};
43
44
 
44
45
  if (!Cfg?.server?.jwt?.expiresIn) {
45
46
  Cfg["server"]["jwt"]["expiresIn"] = "7d";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.50.2",
3
+ "version": "0.52.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {
package/types/gen.ts CHANGED
@@ -14,17 +14,6 @@ async function createDnaxDir() {
14
14
  fs.mkdirSync(dirPath, { recursive: true });
15
15
  }
16
16
  }
17
-
18
- // copy tsconfig coentent to to .dnax/tsconfig.json
19
- const tsconfigPath = path.join(dnaxDir, "tsconfig.json");
20
- if (!fs.existsSync(tsconfigPath)) {
21
- fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2));
22
- } else {
23
- const currentContent = fs.readFileSync(tsconfigPath, "utf8");
24
- if (currentContent !== JSON.stringify(tsconfig, null, 2)) {
25
- fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2));
26
- }
27
- }
28
17
  }
29
18
 
30
19
  function generateCollectionTypes() {
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "baseUrl": ".",
4
3
  "paths": {
5
4
  "#/*": [
6
- "../*"
5
+ "./*"
7
6
  ]
8
7
  },
9
8
  // Enable latest features