milkio 0.0.4 → 0.0.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/c.ts CHANGED
@@ -30,23 +30,13 @@ const commands = {
30
30
  async test(files?: string, reserved?: string) {
31
31
  const run = async () => {
32
32
  const packageJson = await JSON.parse((await readFile(join(rootPath, "package.json"))).toString());
33
- // A bug has appeared in the new version of bun: https://github.com/oven-sh/bun/issues/9428
34
- // Therefore, temporarily switch to another implementation.
35
- // await $`${{ raw: packageJson.scripts.start }}`.env({
36
- // ...env,
37
- // milkio_RUN_MODE: "API_TEST",
38
- // milkio_TEST: files ?? "1"
39
- // });
40
- //
41
- await exec(rootPath, ["bash", "-c", packageJson.scripts.start as string], {
42
- env: {
43
- ...env,
44
- milkio_RUN_MODE: "API_TEST",
45
- milkio_TEST: files ?? "1"
46
- }
33
+ await $`${{ raw: packageJson.scripts.start }}`.env({
34
+ ...env,
35
+ MILKIO_RUN_MODE: "API_TEST",
36
+ MILKIO_TEST: files ?? "1"
47
37
  });
48
38
  };
49
- if (!env.milkio_TEST_RESERVED && reserved !== "1") {
39
+ if (!env.MILKIO_TEST_RESERVED && reserved !== "1") {
50
40
  // Normal test
51
41
  await run();
52
42
  } else {
package/kernel/config.ts CHANGED
@@ -4,8 +4,8 @@ import { envToBoolean, envToNumber, envToString } from "..";
4
4
  export const configMilkio = {
5
5
  cwd: cwd(),
6
6
  port: envToNumber(env.PORT, 9000),
7
- milkioRunMode: envToString(env.milkio_RUN_MODE, "DEFAULT"),
8
- milkioTest: envToString(env.milkio_TEST, ""),
7
+ milkioRunMode: envToString(env.MILKIO_RUN_MODE, "DEFAULT"),
8
+ milkioTest: envToString(env.MILKIO_TEST, ""),
9
9
  debug: envToBoolean(env.DEBUG, false),
10
10
  ignorePathLevel: envToNumber(env.IGNORE_PATH_LEVEL, 0),
11
11
  corsAllowMethods: envToString(env.CORS_ALLOW_METHODS, "*"),
package/package.json CHANGED
@@ -2,20 +2,20 @@
2
2
  "name": "milkio",
3
3
  "type": "module",
4
4
  "module": "index.ts",
5
- "version": "0.0.4",
5
+ "version": "0.0.5",
6
6
  "peerDependencies": {
7
7
  "typescript": "^5.4.2"
8
8
  },
9
9
  "dependencies": {
10
10
  "@poech/camel-hump-under": "^1.1.0",
11
11
  "@southern-aurora/tson": "2.0.2",
12
- "ulidx": "^2.3.0"
12
+ "ulidx": "^2.3.0",
13
+ "walk-sync": "^3.0.0",
14
+ "typia": "5.5.5",
15
+ "ejs": "^3.1.9"
13
16
  },
14
17
  "devDependencies": {
15
18
  "@types/bun": "latest",
16
- "walk-sync": "^3.0.0",
17
- "typia": "5.5.5",
18
- "ejs": "^3.1.9",
19
19
  "@types/ejs": "^3.1.5",
20
20
  "@types/js-beautify": "^1.14.3",
21
21
  "ts-patch": "^3.1.2",
@@ -6,7 +6,7 @@ import { join } from "node:path";
6
6
  import { copyFile, mkdir } from "node:fs/promises";
7
7
 
8
8
  export async function buildDTO() {
9
- console.log("🧊 milkio DTO Building..");
9
+ console.log("🧊 Milkio DTO Building..");
10
10
 
11
11
  removeDir(join(cwd(), "packages", "dto", "dist"));
12
12
  removeDir(join(cwd(), "packages", "dto", "generate"));
@@ -36,7 +36,7 @@ export async function buildDTO() {
36
36
 
37
37
  const root = join(cwd(), "packages", "dto");
38
38
 
39
- console.log("🧊 milkio DTO Build Finished");
39
+ console.log("🧊 Milkio DTO Build Finished");
40
40
  console.log("\x1B[2m");
41
41
  console.log("Now, your latest code (including changes to your interface) is built to the latest version and waiting for your release!");
42
42
  console.log("");
@@ -14,10 +14,10 @@ export async function generate() {
14
14
  await generateDatabase();
15
15
  }
16
16
 
17
- console.log("milkio Database Generating..");
17
+ console.log("Milkio Database Generating..");
18
18
 
19
19
  await generate();
20
20
 
21
- console.log("\nāœ… milkio Database Generated!\n");
21
+ console.log("\nāœ… Milkio Database Generated!\n");
22
22
 
23
23
  exit(0);
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { argv, exit } from "node:process";
4
4
  import { generateApp } from "./generate/generate-app";
5
- console.log("milkio Quick Generating..");
5
+ console.log("Milkio Quick Generating..");
6
6
 
7
7
  export async function generatePartial(path?: string) {
8
8
  await generateApp();
@@ -10,6 +10,6 @@ export async function generatePartial(path?: string) {
10
10
 
11
11
  await generatePartial(...(argv.slice(3) as any));
12
12
 
13
- console.log("\nāœ… milkio Generated!");
13
+ console.log("\nāœ… Milkio Generated!");
14
14
 
15
15
  exit(0);
@@ -14,10 +14,10 @@ export async function generate() {
14
14
  await generateApp();
15
15
  }
16
16
 
17
- console.log("milkio Generating..");
17
+ console.log("Milkio Generating..");
18
18
 
19
19
  await generate();
20
20
 
21
- console.log("\nāœ… milkio Generated!");
21
+ console.log("\nāœ… Milkio Generated!");
22
22
 
23
23
  exit(0);
package/types.ts CHANGED
@@ -35,8 +35,6 @@ export type CookbookItem = {
35
35
  }>;
36
36
  };
37
37
 
38
- export type DatabaseType<Table extends { findFirst: () => unknown }, Override = {}> = Mixin<NonNullable<Awaited<ReturnType<Table["findFirst"]>>>, Override>;
39
-
40
38
  export type Override<P, S> = Omit<P, keyof S> & S;
41
39
 
42
40
  export type Mixin<T, U> = U & Omit<T, keyof U>;