miqro 4.0.0 → 4.0.1

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.
@@ -2,7 +2,7 @@ import { ConfigPathResolver, loadConfig } from "@miqro/core";
2
2
  import { existsSync, mkdirSync, writeFileSync } from "fs";
3
3
  import { resolve } from "path";
4
4
  const mainTemplates = {
5
- ts: () => `import { APIRouter, Server, checkEnvVariables, getLogger, middleware } from "@miqro/core";
5
+ ts: () => `import { APIRouter, Server, checkEnvVariables, getLogger } from "@miqro/core";
6
6
  import { resolve } from "path";
7
7
 
8
8
  /*
@@ -16,7 +16,6 @@ const logger = getLogger("server");
16
16
 
17
17
  async function main() {
18
18
  const server = new Server();
19
- server.use(middleware());
20
19
  server.use(await APIRouter({
21
20
  dirname: resolve("./build/api")
22
21
  }), "/api");
@@ -27,7 +26,7 @@ async function main() {
27
26
 
28
27
  main().catch(e => logger.error(e));
29
28
  `,
30
- js: () => `const { APIRouter, App, checkEnvVariables, getLogger, middleware } = require("@miqro/core");
29
+ js: () => `const { APIRouter, App, checkEnvVariables, getLogger } = require("@miqro/core");
31
30
  const { resolve } = require("path");
32
31
 
33
32
  /*
@@ -41,7 +40,6 @@ const logger = getLogger("server");
41
40
 
42
41
  async function main() {
43
42
  const server = new App();
44
- server.use(middleware());
45
43
  server.use(await APIRouter({
46
44
  dirname: resolve(__dirname, "api")
47
45
  }), "/api");
@@ -13,7 +13,7 @@ it("happy path health", async () => {
13
13
  const response = await TestHelper(new Server().use(await APIRouter({
14
14
  dirname: resolve("./build/api")
15
15
  })), {
16
- url: "/api/health"
16
+ url: "/health"
17
17
  });
18
18
  strictEqual(response.status, 200);
19
19
  });
package/build/cmds/new.js CHANGED
@@ -74,7 +74,7 @@ export const mainTS = () => {
74
74
  "compileOnSave": true,
75
75
  "compilerOptions": {
76
76
  "lib": ["es2021"],
77
- "module": "es2022",
77
+ "module": "Node16",
78
78
  "moduleResolution": "Node16",
79
79
  "target": "es2021",
80
80
  "strict": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miqro",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",