milkio 0.0.8 → 0.0.9
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/kernel/milkio.ts +2 -2
- package/package.json +1 -1
package/kernel/milkio.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { MilkioContext } from "./context";
|
|
|
7
7
|
import { type Mixin, type ExecuteId, type Fail, type FailEnumerates, loggerPushTags, loggerSubmit, runtime, TSON, type Logger, useLogger, configMilkio } from "..";
|
|
8
8
|
import { hanldeCatchError } from "../utils/handle-catch-error";
|
|
9
9
|
import { _validate } from "./validate";
|
|
10
|
-
import { cwd, exit } from "node:process";
|
|
10
|
+
import { cwd, exit, argv } from "node:process";
|
|
11
11
|
import { createUlid } from "../utils/create-ulid";
|
|
12
12
|
|
|
13
13
|
export type MilkioAppOptions = {
|
|
@@ -40,7 +40,7 @@ export type MilkioAppOptions = {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export async function createMilkioApp(MilkioAppOptions: MilkioAppOptions = {}) {
|
|
43
|
-
if (
|
|
43
|
+
if (argv[2].startsWith("--run-mode:")) configMilkio.milkioRunMode = process.argv[2].split("--run-mode:")[1];
|
|
44
44
|
|
|
45
45
|
if (MilkioAppOptions?.enableMaxRequestLimit && MilkioAppOptions.enableMaxRequestLimit >= 1) {
|
|
46
46
|
runtime.maxRequest.expected = MilkioAppOptions.enableMaxRequestLimit;
|