@dnax/core 0.6.3 → 0.6.5

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
@@ -381,7 +381,10 @@ function HonoInstance(): typeof app {
381
381
  let insertedFiles = [];
382
382
  for await (let file of parseBody?.file) {
383
383
  let insertedFile = await drive.write(file.name, file);
384
- insertedFiles.push(insertedFile);
384
+ insertedFiles.push({
385
+ ...data,
386
+ _file: insertedFile,
387
+ });
385
388
  }
386
389
  response = await rest.insertMany(col?.slug, insertedFiles);
387
390
  } else if (typeof parseBody?.file == "object") {
package/app/index.ts CHANGED
@@ -18,6 +18,8 @@ type configRunApp = {
18
18
  };
19
19
  async function runApp(config?: configRunApp, clb?: Function) {
20
20
  hookDatabase.cb = config?.dbSync || [];
21
+ // Load all ressouce
22
+ await init();
21
23
  await loadCfg(); // Load Config
22
24
  const HonoApp = HonoInstance();
23
25
  const PORT = Cfg.server?.port || process.env?.PORT || 4000;
@@ -36,8 +38,6 @@ async function runApp(config?: configRunApp, clb?: Function) {
36
38
  await findPort.isAvailable(PORT).then(async (available: boolean) => {
37
39
  // Start App server
38
40
  if (available) {
39
- // Load all ressouce
40
- await init();
41
41
  //BeforeStart
42
42
  if (config?.beforeStart) {
43
43
  for (const fn of config?.beforeStart) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {