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
|
|
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
|
|
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");
|
package/build/cmds/new-test.js
CHANGED
package/build/cmds/new.js
CHANGED